Electronic Device

ABSTRACT

The accuracy of reading characteristics or data of pixels or memory cells in a matrix device is increased. An electronic device includes a plurality of drive lines, a sense line intersecting the drive lines, a plurality of element devices provided at intersections thereof, a detecting circuit, a decoder, and a driver. The detecting circuit can detect a first physical quantity of the sense line and transmit a digital signal obtained by digitizing the first physical quantity to the decoder. Each of the element devices can change the first physical quantity of the sense line in accordance with a signal of the corresponding drive line. The driver can transmit coded signals based on a Hadamard matrix to the decoder and the drive lines. The decoder can perform arithmetic processing with use of the coded signals and the digital signal and calculate values based on second physical quantities of the element devices.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This disclosure relates to techniques for performing processing such asdetection of a physical quantity (a resistance or a capacitance) of anelement device (a pixel, a memory cell, or a constituent electricelement thereof) included in a matrix device.

2. Description of the Related Art

Patent Document 1 discloses a technique of applying coded signals to aplurality of signal lines (drive lines) of a matrix device at the sametime and detecting a physical quantity (a physical quantity to bemeasured, a first physical quantity) of another signal line (sense line)intersecting the drive lines, thereby calculating physical quantities(physical quantities to be calculated, second physical quantities) ofelement devices at intersections of the drive lines and the sense line.

In Patent Document 1, a potential (a voltage) is given as an example ofthe physical quantity to be measured, and capacitances at theintersections of the drive lines and the sense line are given as anexample of the physical quantities to be calculated. In addition,signals based on a Hadamard matrix are given as an example of the codedsignals. That is, Patent Document 1 discloses inputting signals,specifically, inputting signals corresponding to elements in the firstcolumn of the Hadamard matrix to the drive lines at a first time andinputting signals corresponding to elements in the second column of theHadamard matrix to the drive lines at a second time.

The accuracy of measurement can be improved particularly when the codedsignals are signals based on a Hadamard matrix created by Sylvester'smethod, whereas Patent Document 1 points out that defective detection iscaused because a signal of a particular drive line has permanently thesame code.

-   [Patent Document 1] United States Patent Application Publication No.    2013/0211757

SUMMARY

A novel method of inputting coded signals based on a Hadamard matrix(especially a Hadamard matrix created by Sylvester's method) to aplurality of drive lines and detecting a physical quantity of a senseline, thereby calculating physical quantities of element devices (pixelsor memory cells) at intersections of the drive lines and the sense line,a novel device which can employ such a measurement method, a method forsetting or manufacturing a device using such a measurement method, orthe like is provided.

An electronic device includes N first wirings (drive lines), a secondwiring (a sense line) intersecting the N first wirings, first to N-thelement devices (including an n-th element device (n is an integergreater than or equal to 1 and less than or equal to N)) provided atintersections of the N first wirings and the second wiring, a detectingcircuit, a decoder, and a driver. The detecting circuit is capable ofdetecting a first physical quantity of the second wiring andtransmitting a digital signal obtained by digitizing the first physicalquantity to the decoder. Each of the first to N-th element devices iscapable of changing the first physical quantity in accordance with asignal of the corresponding one of the N first wirings. The driver iscapable of transmitting coded signals based on a Hadamard matrix to thedecoder and the N first wirings. The decoder is capable of performingarithmetic processing with use of the coded signals and the digitalsignal and calculating a value based on a second physical quantity ofthe n-th element device. Note that the Hadamard matrix may be created bySylvester's method and have an order which is greater than or equal to 4and is a power of 2 (4, 8, 16, . . . ). The value based on the secondphysical quantity of the n-th element device may be calculated as adifference from a value based on a second physical quantity of one ofthe first to N-th element devices excluding the n-th element device. Thefirst physical quantity may be a current, a potential, or a voltage. Thesecond physical quantity may be a resistance, a capacitance, or acurrent value. The decoder may include first to N-th arithmeticcircuits, and the digital signal and a signal input to one of the Nfirst wirings may be input to each of the arithmetic circuits. Ademultiplexer may be provided between the driver and the N firstwirings. A delay circuit may be provided between the driver and thedecoder. Each of the element devices may be a memory cell capable ofstoring multi-level data or analog data. The driver may be configured soas not to output coded signals corresponding to the first column of theHadamard matrix, and the detecting circuit may be configured so as notto detect the first physical quantity of the second wiring at that time.

In one example, the reliability of the physical quantity to be measuredcan be increased. Other effects can be derived from the description ofthe specification, the drawings, the claims, and the like.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a configuration example of a matrix device.

FIGS. 2A to 2C illustrate a circuit example and an operation example ofelement devices.

FIGS. 3A and 3B each illustrate a configuration example of an electronicdevice.

FIGS. 4A and 4B each illustrate a configuration example of an electronicdevice.

FIG. 5 illustrates a configuration example of an electronic device.

FIGS. 6A and 6B each illustrate a configuration example of a decoder.

FIGS. 7A and 7B illustrate a configuration example and an operationexample of an arithmetic circuit.

FIGS. 8A and 8B illustrate configuration examples of an arithmeticcircuit and a logic portion.

FIGS. 9A and 9B each illustrate a configuration example of a logicportion.

FIGS. 10A and 10B each illustrate a configuration example of a logicportion.

FIGS. 11A to 11D illustrate configuration examples of an arithmeticcircuit and logic portions.

FIG. 12 illustrates a configuration example of a matrix device.

FIGS. 13A and 13B each illustrate a configuration example of anelectronic device.

FIG. 14 illustrates a configuration example of an electronic device.

FIGS. 15A and 15B illustrate circuit examples of a matrix device and anelement device.

DETAILED DESCRIPTION OF THE INVENTION

Embodiments will be described in detail below with reference to theaccompanying drawings. Note that the embodiments are not limited to thefollowing description, and it will be easily understood by those skilledin the art that various changes and modifications can be made withoutdeparting from the spirit and scope and that, for example, techniques inthis disclosure can be combined and a technique in this disclosure and atechnique other than that can be combined. Therefore, the presentinvention should not be interpreted as being limited to the followingdescription of the embodiments. In the following embodiments, the sameportions or portions having similar functions are denoted by the samereference numerals in different drawings, and explanation thereof willnot be repeated.

Examples using a Hadamard matrix of order 8 will be mainly describedbelow; however, the same applies to Hadamard matrices of orders of 4,16, 32, and higher. Hadamard matrices do not necessarily need to becreated by Sylvester's method. Furthermore, the present invention can besimilarly carried out using a product obtained by multiplying a Hadamardmatrix with a nonzero constant (such as −1).

A technique described in any of the following embodiments can becombined with a technique described in the embodiment, a techniquedescribed in another embodiment, or another technique.

Embodiment 1 Outline of Matrix Device

FIG. 1 illustrates a matrix device 10 with eight rows and seven columns.Here, a plurality of element devices 11 are arranged in a matrix; forexample, an element device 11 in the first row and the first column isdescribed as an element device 11[1,1], and an element device 11 in theeighth row and the seventh column is described as an element device11[8,7]. A plurality of drive lines Drv and a plurality of sense linesSns are provided to intersect each other. For example, a drive line Drvin the second row is described as a drive line Drv[2], and a sense lineSns in the first column is described as a sense line Sns[1].

In general, an element device 11 in the n-th row and the m-th column isdescribed as an element device 11[n,m], where n is an integer of 1 to 8and in is an integer of 1 to 7. A drive line Drv in the n-th row and asense line Sns in the m-th column are described as a drive line Drv[n]and a sense line Sns[m], respectively, where n is an integer of 1 to 8and in is an integer of 1 to 7. Other wirings, devices, physicalquantities, and the like are described in the same manner.

Each of the element devices 11 changes a physical quantity (a firstphysical quantity) of the corresponding sense line Sns in accordancewith a signal of the corresponding drive line Drv. Direct or indirectdetection of the first physical quantity makes it possible to calculatea temporary or permanent characteristic or physical property (a secondphysical quantity) of each of the element devices 11. Examples of thefirst physical quantity include, but are not limited to, a potential (avoltage), a current, and a magnetic field. Examples of the secondphysical quantity to be calculated include, but are not limited to, theintensity of electromagnetic waves (light), a saturation current valueof a field-effect transistor, a capacitance, a resistance, aninductance, and spins.

Here, as an example, each of the element devices 11 is a memory cellincluding a magnetic tunnel junction element. Note that an element whoseresistance or current value changes in response to a phase change or achange in atomic arrangement or chemical state may be employed insteadof the magnetic tunnel junction element. As described later, a largechange in resistance or current value is not necessary for a methoddescribed in this embodiment; thus, the method can be used for amaterial or a structure which has been considered to be unsuitable for amemory. The material and structure are likely to be in intermediatestates, which might enable multi-level recording.

The magnetic tunnel junction element has a tunnel insulating filmbetween two magnetic layers and has a feature that the amount of atunnel current is larger when the two magnetic layers are magnetized inthe same direction than when they are not (this feature is also referredto as spin tunnel effect). Whether the two magnetic layers aremagnetized in the same direction or in different directions is made tocorrespond to 1 or 0, whereby the magnetic tunnel junction element canbe used as a memory. Furthermore, magnetic tunnel junction elementsarranged in a matrix can be used as a random access memory (RAM), whichis called a spin-transfer torque magnetic RAM (STT-MRAM).

Although the tunnel current of a magnetic tunnel junction elementchanges in accordance with whether the two magnetic layers aremagnetized in the same direction or in different directions, the ratiothereof (on/off ratio) is not sufficiently high and is at most less than10. To make the ratio 2 or more, the tunnel insulating layer needs to besingle crystal, which causes a problem in terms of mass production.Furthermore, miniaturization results in a further decrease of the ratio.For example, the on/off ratio in perpendicular magnetization, which issuitable for miniaturization, is a fraction of that of m-planemagnetization. Furthermore, the tunnel current is proportional to ajunction area; when the device is miniaturized, a tunnel current is afraction of the square of line width. Therefore, a device suitable formass production does not have a high on/off ratio nor a large absolutevalue of a tunnel current, and high detection accuracy is required.

The element devices 11 have, for example, a circuit configurationillustrated in FIG. 2A. As illustrated in FIG. 2A, both electrodes of amagnetic tunnel junction element 15 in the element device 11[7,7] and asource and a drain of a transistor 16 are between the sense line Sns[7]and the drive line Drv[7]. Although the source and the drain of thetransistor 16 are between the sense line Sns[7] and the magnetic tunneljunction element 15 in FIG. 2A, the source and the drain of thetransistor 16 may be between the drive line Drv[7] and the magnetictunnel junction element 15. The transistor 16 is controlled by a wordline Wrd[7]. Instead of the transistor 16, a switch having a similarfunction may be used. The same applies to the element device 11[8,7] andalso to other element devices 11 which are not illustrated in FIG. 2A.

Although the element device 11 in FIG. 2A is an example of a memory cellincluding the transistor 16, a cross-point memory cell which does notinclude the transistor 16 may be used. In the absence of a transistor ina memory cell, magnetization cannot be fully achieved in view ofinterference (crosstalk) with other element devices and therefore theon/off ratio of a tunnel current at the time of reading is low. However,in a method described in this embodiment, such a low on/off ratio doesnot cause any problem as described later.

FIG. 2B illustrates a data writing operation. For example, when data iswritten to the element device 11[8,7], only the transistor 16 in theelement device 11[8,7] is turned on, and a current based on the data issupplied to the sense line Sns[7]. For example, the potential of thesense line Sns[7] is set to V+ or V− in accordance with the data, andthe potential of the drive line Drv[8] is set to V0. Here, V+ is higherthan V0, and V− is lower than V0. Consequently, the direction of currentflow in the magnetic tunnel junction element 15 changes with the data,and the direction of magnetization of a storage layer, one of twomagnetic layers, of the magnetic tunnel junction element 15 depends onthe data.

FIG. 2C illustrates a data reading operation. Here, the transistors 16in the element devices 11[1,7] to 11[8,7] are turned on. The potentialof the drive line Drv is set to VH or VL in accordance with a codedsignal. Here, VH is higher than V0, and VL is lower than V0. Thus, thepotential difference of the magnetic tunnel junction element 15 is VH−V0or VL−V0; a current generated by this potential difference does notchange the direction of magnetization of the storage layer of themagnetic tunnel junction element 15.

In the case where the resistance of the magnetic tunnel junction element15 is independent of the direction of current flow, the same amount ofcurrent can be made to flow in the opposite direction when the averageof VH and VL is equal to V0 (i.e., VH−V0=V0−VL). In the case where theresistance of the magnetic tunnel junction element 15 is dependent onthe direction of current flow, a correction method described later canbe employed.

Note that the magnetic tunnel junction element 15 generally utilizestunneling and is therefore a nonlinear element. A tunneling current isvery small and cannot be measured when the potential difference betweenterminals is small, but increases significantly after the potentialdifference exceeds a certain value. Therefore, even when the potentialof the drive line Drv and the potential of the sense line Sns are notexactly equal to each other, the current flowing in the magnetic tunneljunction element 15 can be made negligibly small.

For example, when the potential of the drive line Drv[8] is VH, acurrent flows from the drive line Drv[8] to the sense line Sns[7], andwhen the potential of the drive line Drv[8] is VL, a current flows fromthe sense line Sns[7] to the drive line Drv[8]. The direction of currentflow is determined by the coded signal supplied at that time. The amountof a current (the current value) i[8,7] of the element device 11[8,7] isdependent on the resistance of the element device 11[8,7] (i.e., datastored therein). The same applies to the other drive lines Drv.Consequently, a current I[7]_(t=1) flowing through the sense line Sns[7]at time t=1 can be represented by

I[7]_(t=1)=α[1]_(t=1) i[1,7]+α[2]_(t=1) i[2,7]+ . . . +α[8,7]_(t=1)i[8,7]

Here, α[1]_(t=1), α[2]_(t=1), . . . , α[8]_(t=1) denote signals appliedto the drive lines Drv[1], Drv[2], . . . , Drv[8], respectively, at timet=1.

Note that measurement of the current I[7]_(t=1) includes measurement ofpotential changes caused by charge entrance into, or charge exit from,capacitors with a predetermined capacitance, and also includesdetermination of changes in, or magnitude relationships between,permanent or temporary physical quantities (such as potentials, magneticfields, times, and temperatures) caused directly or indirectly by thecurrent.

Whether the current I[7]_(t=1) is 1, −1, or 0 can be determined, forexample, by examining whether the potential of the sense line Sns(potential V0) in a state of being connected only to the element devices11 and electrically insulated from other wirings (i.e., in a floatingstate) increases, decreases, or hardly changes in a predetermined periodof time.

Note that the current I will be described below using the current valuei. The current value i can be uniquely determined by the potentialdifference (voltage) applied to the element device 11 and by theresistance of the element device 11. Assuming that the same potentialdifference is applied to the element devices, the current I may bedescribed using the resistance of the element device.

Similarly, a current I[7]_(t=2) at time t=2 can be represented by

I[7]_(t=2)=α[1]_(t=2) i[1,7]+α[2]_(t=2) i[2,7]+ . . . +α[8,7]_(t=2)i[8,7]

In this manner, similar equations are obtained for currents I[7]_(t=3)to I[7]_(t=7) at times t=3 to t=8.

Here, the currents I[7]_(t=1) to I[7]_(t=7) are measurable physicalquantities (first physical quantities), and the current values i[1,7] toi[8,7] are unknowns (second physical quantities). These equations aresimultaneous equations with eight unknowns. Accordingly, the currentvalues i[1,7] to i[8,7] can be obtained by solving the equations.

The equations are represented by

$\mspace{20mu} {{\begin{pmatrix}{I\lbrack 7\rbrack}_{t = 1} \\{I\lbrack 7\rbrack}_{t = 2} \\{I\lbrack 7\rbrack}_{t = 3} \\{I\lbrack 7\rbrack}_{t = 4} \\{I\lbrack 7\rbrack}_{t = 5} \\{I\lbrack 7\rbrack}_{t = 6} \\{I\lbrack 7\rbrack}_{t = 7} \\{I\lbrack 7\rbrack}_{t = 8}\end{pmatrix} = {H\begin{pmatrix}{i\lbrack {1,7} \rbrack} \\{i\lbrack {2,7} \rbrack} \\{i\lbrack {3,7} \rbrack} \\{i\lbrack {4,7} \rbrack} \\{i\lbrack {5,7} \rbrack} \\{i\lbrack {6,7} \rbrack} \\{i\lbrack {7,7} \rbrack} \\{i\lbrack {8,7} \rbrack}\end{pmatrix}}},\mspace{20mu} {where}}$ $H = {\begin{pmatrix}\begin{matrix}{\alpha \lbrack 1\rbrack}_{t = 1} & {\alpha \lbrack 2\rbrack}_{t = 1} \\{\alpha \lbrack 1\rbrack}_{t = 2} & {\alpha \lbrack 2\rbrack}_{t = 2} \\{\alpha \lbrack 1\rbrack}_{t = 3} & {\alpha \lbrack 2\rbrack}_{t = 3} \\{\alpha \lbrack 1\rbrack}_{t = 4} & {\alpha \lbrack 2\rbrack}_{t = 4} \\{\alpha \lbrack 1\rbrack}_{t = 5} & {\alpha \lbrack 2\rbrack}_{t = 5} \\{\alpha \lbrack 1\rbrack}_{t = 6} & {\alpha \lbrack 2\rbrack}_{t = 6} \\{\alpha \lbrack 1\rbrack}_{t = 7} & {\alpha \lbrack 2\rbrack}_{t = 7} \\{\alpha \lbrack 1\rbrack}_{t = 8} & {\alpha \lbrack 2\rbrack}_{t = 8}\end{matrix} & \begin{matrix}{\alpha \lbrack 3\rbrack}_{t = 1} \\{\alpha \lbrack 3\rbrack}_{t = 2} \\{\alpha \lbrack 3\rbrack}_{t = 3} \\{\alpha \lbrack 3\rbrack}_{t = 4} \\{\alpha \lbrack 3\rbrack}_{t = 5} \\{\alpha \lbrack 3\rbrack}_{t = 6} \\{\alpha \lbrack 3\rbrack}_{t = 7} \\{\alpha \lbrack 3\rbrack}_{t = 8}\end{matrix} & \begin{matrix}{\alpha \lbrack 4\rbrack}_{t = 1} \\{\alpha \lbrack 4\rbrack}_{t = 2} \\{\alpha \lbrack 4\rbrack}_{t = 3} \\{\alpha \lbrack 4\rbrack}_{t = 4} \\{\alpha \lbrack 4\rbrack}_{t = 5} \\{\alpha \lbrack 4\rbrack}_{t = 6} \\{\alpha \lbrack 4\rbrack}_{t = 7} \\{\alpha \lbrack 4\rbrack}_{t = 8}\end{matrix} & \begin{matrix}{\alpha \lbrack 5\rbrack}_{t = 1} \\{\alpha \lbrack 5\rbrack}_{t = 2} \\{\alpha \lbrack 5\rbrack}_{t = 3} \\{\alpha \lbrack 5\rbrack}_{t = 4} \\{\alpha \lbrack 5\rbrack}_{t = 5} \\{\alpha \lbrack 5\rbrack}_{t = 6} \\{\alpha \lbrack 5\rbrack}_{t = 7} \\{\alpha \lbrack 5\rbrack}_{t = 8}\end{matrix} & \begin{matrix}{\alpha \lbrack 6\rbrack}_{t = 1} \\{\alpha \lbrack 6\rbrack}_{t = 2} \\{\alpha \lbrack 6\rbrack}_{t = 3} \\{\alpha \lbrack 6\rbrack}_{t = 4} \\{\alpha \lbrack 6\rbrack}_{t = 5} \\{\alpha \lbrack 6\rbrack}_{t = 6} \\{\alpha \lbrack 6\rbrack}_{t = 7} \\{\alpha \lbrack 6\rbrack}_{t = 8}\end{matrix} & \begin{matrix}{\alpha \lbrack 7\rbrack}_{t = 1} \\{\alpha \lbrack 7\rbrack}_{t = 2} \\{\alpha \lbrack 7\rbrack}_{t = 3} \\{\alpha \lbrack 7\rbrack}_{t = 4} \\{\alpha \lbrack 7\rbrack}_{t = 5} \\{\alpha \lbrack 7\rbrack}_{t = 6} \\{\alpha \lbrack 7\rbrack}_{t = 7} \\{\alpha \lbrack 7\rbrack}_{t = 8}\end{matrix} & \begin{matrix}{\alpha \lbrack 8\rbrack}_{t = 1} \\{\alpha \lbrack 8\rbrack}_{t = 2} \\{\alpha \lbrack 8\rbrack}_{t = 3} \\{\alpha \lbrack 8\rbrack}_{t = 4} \\{\alpha \lbrack 8\rbrack}_{t = 5} \\{\alpha \lbrack 8\rbrack}_{t = 6} \\{\alpha \lbrack 8\rbrack}_{t = 7} \\{\alpha \lbrack 8\rbrack}_{t = 8}\end{matrix}\end{pmatrix}.}$

The equations are also represented by

${\begin{pmatrix}{i\lbrack {1,1} \rbrack} \\{i\lbrack {2,1} \rbrack} \\{i\lbrack {3,1} \rbrack} \\{i\lbrack {4,1} \rbrack} \\{i\lbrack {5,1} \rbrack} \\{i\lbrack {6,1} \rbrack} \\{i\lbrack {7,1} \rbrack} \\{i\lbrack {8,1} \rbrack}\end{pmatrix} = {H^{- 1}\begin{pmatrix}{I\lbrack 1\rbrack}_{t = 1} \\{I\lbrack 1\rbrack}_{t = 2} \\{I\lbrack 1\rbrack}_{t = 3} \\{I\lbrack 1\rbrack}_{t = 4} \\{I\lbrack 1\rbrack}_{t = 5} \\{I\lbrack 1\rbrack}_{t = 6} \\{I\lbrack 1\rbrack}_{t = 7} \\{I\lbrack 1\rbrack}_{t = 8}\end{pmatrix}}},$

where H⁻¹ is an inverse matrix of the matrix H.

Although focus is placed on only the seventh column in the abovedescription, if currents flowing through the other sense lines Sns canbe measured at the same time at times t=1 to t=8,

I = H ι, where $I = \begin{pmatrix}\begin{matrix}{I\lbrack 1\rbrack}_{t = 1} \\{I\lbrack 1\rbrack}_{t = 2} \\{I\lbrack 1\rbrack}_{t = 3} \\{I\lbrack 1\rbrack}_{t = 4} \\{I\lbrack 1\rbrack}_{t = 5} \\{I\lbrack 1\rbrack}_{t = 6} \\{I\lbrack 1\rbrack}_{t = 7} \\{I\lbrack 1\rbrack}_{t = 8}\end{matrix} & \begin{matrix}{I\lbrack 2\rbrack}_{t = 1} \\{I\lbrack 2\rbrack}_{t = 2} \\{I\lbrack 2\rbrack}_{t = 3} \\{I\lbrack 2\rbrack}_{t = 4} \\{I\lbrack 2\rbrack}_{t = 5} \\{I\lbrack 2\rbrack}_{t = 6} \\{I\lbrack 2\rbrack}_{t = 7} \\{I\lbrack 2\rbrack}_{t = 8}\end{matrix} & \begin{matrix}{I\lbrack 3\rbrack}_{t = 1} \\{I\lbrack 3\rbrack}_{t = 2} \\{I\lbrack 3\rbrack}_{t = 3} \\{I\lbrack 3\rbrack}_{t = 4} \\{I\lbrack 3\rbrack}_{t = 5} \\{I\lbrack 3\rbrack}_{t = 6} \\{I\lbrack 3\rbrack}_{t = 7} \\{I\lbrack 3\rbrack}_{t = 8}\end{matrix} & \begin{matrix}{I\lbrack 4\rbrack}_{t = 1} \\{I\lbrack 4\rbrack}_{t = 2} \\{I\lbrack 4\rbrack}_{t = 3} \\{I\lbrack 4\rbrack}_{t = 4} \\{I\lbrack 4\rbrack}_{t = 5} \\{I\lbrack 4\rbrack}_{t = 6} \\{I\lbrack 4\rbrack}_{t = 7} \\{I\lbrack 4\rbrack}_{t = 8}\end{matrix} & \begin{matrix}{I\lbrack 5\rbrack}_{t = 1} \\{I\lbrack 5\rbrack}_{t = 2} \\{I\lbrack 5\rbrack}_{t = 3} \\{I\lbrack 5\rbrack}_{t = 4} \\{I\lbrack 5\rbrack}_{t = 5} \\{I\lbrack 5\rbrack}_{t = 6} \\{I\lbrack 5\rbrack}_{t = 7} \\{I\lbrack 5\rbrack}_{t = 8}\end{matrix} & \begin{matrix}{I\lbrack 6\rbrack}_{t = 1} \\{I\lbrack 6\rbrack}_{t = 2} \\{I\lbrack 6\rbrack}_{t = 3} \\{I\lbrack 6\rbrack}_{t = 4} \\{I\lbrack 6\rbrack}_{t = 5} \\{I\lbrack 6\rbrack}_{t = 6} \\{I\lbrack 6\rbrack}_{t = 7} \\{I\lbrack 6\rbrack}_{t = 8}\end{matrix} & \begin{matrix}{I\lbrack 7\rbrack}_{t = 1} \\{I\lbrack 7\rbrack}_{t = 2} \\{I\lbrack 7\rbrack}_{t = 3} \\{I\lbrack 7\rbrack}_{t = 4} \\{I\lbrack 7\rbrack}_{t = 5} \\{I\lbrack 7\rbrack}_{t = 6} \\{I\lbrack 7\rbrack}_{t = 7} \\{I\lbrack 7\rbrack}_{t = 8}\end{matrix}\end{pmatrix}$ and ${\iota = {\begin{pmatrix}\begin{matrix}{i\lbrack {1,1} \rbrack} \\{i\lbrack {2,1} \rbrack} \\{i\lbrack {3,1} \rbrack} \\{i\lbrack {4,1} \rbrack} \\{i\lbrack {5,1} \rbrack} \\{i\lbrack {6,1} \rbrack} \\{i\lbrack {7,1} \rbrack} \\{i\lbrack {8,1} \rbrack}\end{matrix} & \begin{matrix}{i\lbrack {1,2} \rbrack} \\{i\lbrack {2,2} \rbrack} \\{i\lbrack {3,2} \rbrack} \\{i\lbrack {4,2} \rbrack} \\{i\lbrack {5,2} \rbrack} \\{i\lbrack {6,2} \rbrack} \\{i\lbrack {7,2} \rbrack} \\{i\lbrack {8,2} \rbrack}\end{matrix} & \begin{matrix}{i\lbrack {1,3} \rbrack} \\{i\lbrack {2,3} \rbrack} \\{i\lbrack {3,3} \rbrack} \\{i\lbrack {4,3} \rbrack} \\{i\lbrack {5,3} \rbrack} \\{i\lbrack {6,3} \rbrack} \\{i\lbrack {7,3} \rbrack} \\{i\lbrack {8,3} \rbrack}\end{matrix} & \begin{matrix}{i\lbrack {1,4} \rbrack} \\{i\lbrack {2,4} \rbrack} \\{i\lbrack {3,4} \rbrack} \\{i\lbrack {4,4} \rbrack} \\{i\lbrack {5,4} \rbrack} \\{i\lbrack {6,4} \rbrack} \\{i\lbrack {7,4} \rbrack} \\{i\lbrack {8,4} \rbrack}\end{matrix} & \begin{matrix}{i\lbrack {1,5} \rbrack} \\{i\lbrack {2,5} \rbrack} \\{i\lbrack {3,5} \rbrack} \\{i\lbrack {4,5} \rbrack} \\{i\lbrack {5,5} \rbrack} \\{i\lbrack {6,5} \rbrack} \\{i\lbrack {7,5} \rbrack} \\{i\lbrack {8,5} \rbrack}\end{matrix} & \begin{matrix}{i\lbrack {1,6} \rbrack} \\{i\lbrack {2,6} \rbrack} \\{i\lbrack {3,6} \rbrack} \\{i\lbrack {4,6} \rbrack} \\{i\lbrack {5,6} \rbrack} \\{i\lbrack {6,6} \rbrack} \\{i\lbrack {7,6} \rbrack} \\{i\lbrack {8,6} \rbrack}\end{matrix} & \begin{matrix}{i\lbrack {1,7} \rbrack} \\{i\lbrack {2,7} \rbrack} \\{i\lbrack {3,7} \rbrack} \\{i\lbrack {4,7} \rbrack} \\{i\lbrack {5,7} \rbrack} \\{i\lbrack {6,7} \rbrack} \\{i\lbrack {7,7} \rbrack} \\{i\lbrack {8,7} \rbrack}\end{matrix}\end{pmatrix}.{Hence}}},{\iota = {H^{- 1}{I.}}}$

That is, a current value i[n,m] can be expressed as a polynomial of acurrent I[m]_(t=j) and α[n]_(t=j). Here, n and j are each individuallyan integer of 1 to 8, and in is an integer of 1 to 7.

Although the above description relates to a matrix device with eightrows and seven columns, it can also be similarly applied to a matrixdevice with an arbitrary scale. That is, in a matrix device with N rowsand M columns, a matrix H is a square matrix with N rows, and a matrix Iand a matrix t, are each individually a matrix with N rows and Mcolumns.

The current I will be regarded as a numeric value below. Thus, theexpression “to input the current I to a decoder” means inputting anumeric value as the current I to a decoder. Here, the current I is notlimited to an analog value and may be a digital value. For example, thecurrent I may be a numeric value obtained by digitizing a currentflowing through the sense line Sns. The current value i is also notlimited to an analog value and may be a digital value.

Here, the matrix H may be a matrix whose elements are either 1 or −1.This means that the direction of current flow changes with codedsignals. It is assumed in the following discussion that the amount ofcurrent does not change even when the direction of current flow changes.Note that a correction to be made in the case where the amount ofcurrent changes with the direction of current flow will be describedlater.

As the matrix whose elements are either 1 or −1, a Hadamard matrixcreated by Sylvester's method (hereinafter referred to as a Hadamardmatrix) can be employed.

For example, at time t=j (where j is an integer of 1 to 8), signalscorresponding to eight elements in the j-th column of the Hadamardmatrix are input to the drive lines Drv[1] to Drv[8], respectively. Thismeans that eight elements (h_(1,n) to h_(8,n)) in the n-th row of theHadamard matrix are sequentially input to the drive line Drv[n] (n is aninteger of 1 to 8). Such sets of signals are referred to as codedsignals based on the Hadamard matrix.

As for the Hadamard matrix, the sum of the elements in every row andcolumn excluding the first row and the first column is 0. Therefore,when the coded signals based on the Hadamard matrix are used, the amountof each of the currents I[7]_(t=2) to I[7]_(t=8) is at mostapproximately eight (the order of the Hadamard matrix here) times thestandard deviation of the current values i[1,7] to i[8,7]. Note that thecurrent I[7]_(t=1) is the sum of the current values i[1,7] to i[8,7],which is significantly large. Operation in that case will be describedlater.

An inverse matrix H⁻¹ of a Hadamard matrix H of order N is one N-th ofH. This means that the current value i[8,7], for example, is obtained bydividing the added and/or subtracted values of the currents I[7]_(t=1)to I[7]_(t=8) by 8, and has substantially the same effect as measuringeach current value eight times (that is, the effect of making the errorapproximately 0.36 times) when the currents I[7]_(t=1) to I[7]_(t=8) aresubstantially equal to each other. In general, the effect of making theerror a fraction of the square root of N can be obtained when thedifference between the maximum value and the minimum value of currentsto I[m]_(t=1) to I[m]_(t=N) is approximately 1/N.

Note that in actual data processing, it is acceptable as long as numericvalues can be relatively compared; thus, calculation may be conductedusing the inverse matrix H⁻¹ of the Hadamard matrix H of order N as Hfor simpler calculation. In that case, the current value i[8,7] can becalculated simply by the addition and/or subtraction of the currentsI[7]_(t=1) to I[7]_(t=8).

Note that the Hadamard matrix of order 8 can be applied to theabove-described matrix device with eight rows. The orders of Hadamardmatrices are powers of 2, e.g., 4, 8, and 16. However, there may be amatrix device with 14 rows, for example.

In that case, for example, the matrix device may be divided into thefirst to eighth rows and the seventh to fourteenth rows, on each ofwhich measurement similar to the above is performed. In this case, theseventh row and the eighth row are subjected to the measurement twice,and thus two results are obtained. One of the two results may beemployed, or the average value thereof may be used as the result.Furthermore, it is necessary that current be not supplied to the senselines Sns from the element devices 11 in the ninth to fourteenth rows ina period during which measurement of characteristics of the first toeighth rows is performed.

Note that it can be easily understood that the same conclusion can bedrawn when given rows in the matrix H are interchanged with each other(interchanging rows means only changing the order of the simultaneousequations with multiple unknowns; therefore, their solutions do notchange).

In a larger-scale matrix device, the number of drive lines Drv to whichthe coded signals are input at the same time may be increased with thenumber of rows, or the number of drive lines Drv to which the codedsignals are input at the same time may be limited so that current doesnot practically flow between the drive lines Drv to which the codedsignals are not input and the sense lines Sns. In the example of theelement device 11 illustrated in FIG. 2A, the potential of the driveline Drv to which the coded signal is not input is set to V0, forexample. Alternatively, the transistor 16 of the element device 11 isturned off.

Note that signals may be directly input to the drive lines Drv from asignal generation circuit 21 as in an electronic device illustrated inFIG. 3A, or a signal from the signal generation circuit 21 may be inputto one drive line Drv which is selected by a demultiplexer 22 as in anelectronic device illustrated in FIG. 3B. In FIG. 3B, one of 128 drivelines Drv is selected.

The signal generation circuit 21 illustrated in FIG. 3B has a functionof outputting signals corresponding to rows of the matrix H to aplurality of terminals Trm[1] to Trm[8], respectively. For example, whenthe matrix H has eight rows, eight kinds of signals (corresponding tothe eight rows of the matrix II) are output to eight terminals Trm[1] toTrm[8] in accordance with a reference signal such as a clock signal.

In the case where the matrix device has, for example, 1024 rows, each ofthese eight signals is output via a corresponding 7-bit demultiplexer 22to any of the corresponding 128 drive lines Drv.

The drive line Drv may be either a single wiring or a plurality ofwirings. For example, one drive line Drv may be composed of two wirings.

<Data Reading Method—Basis>

Next, data reading will be described. Here, the amount of current whichflows in the magnetic tunnel junction element 15 of each of the elementdevices 11 is 1.1 ρA when data is “1” and 0.9 ρA when data is “0”. Inthat case, the current ratio (resistance ratio) based on the differentdata is approximately 1.2. Although it is difficult to accurately readdata when the resistance ratio is low as described above, data can beaccurately calculated, as described below, by using the current I thatis output in accordance with the coded signals.

A current is converted by an AD converter and classified into, forexample, three states of being 0, positive, and negative. Specifically,a current which flows in a direction from the drive line Drv to thesense line Sns is regarded as positive; a current of 0.1 ρA or more isdetermined to be 1, a current of −0.1 μA or less is determined to be −1,and a current therebetween is determined to be 0. Thus, thedetermination can be achieved using two comparators. The accuracy of ADconversion in that case is 0.2 μA.

In the case where there is less variation among current values, forexample, a current of 0.15 μA or more may be determined to be 1, acurrent of −0.15 μA or less may be determined to be 1, and a currenttherebetween may be determined to be 0. The accuracy of AD conversion inthat case is 0.3 μA, which is larger than a difference (0.2 μA) betweena current value based on data “1” and a current value based on data “0”.It is needless to say that more accurate AD conversion may be performed.

For example, the element device 11[1,1], the element device 11[2,1], theelement device 11[3,1], the element device 11[4,1], the element device11[5,1], the element device 11[6,1], the element device 11[7,1], and theelement device 11[8,1] store first data “1”, “0”, “0”, “1”, “1”, “0”,“0”, and “0”, respectively.

The Hadamard matrix of order 8 is represented by

$H = {\begin{pmatrix}1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\1 & {- 1} & 1 & {- 1} & 1 & {- 1} & 1 & {- 1} \\1 & 1 & {- 1} & {- 1} & 1 & 1 & {- 1} & {- 1} \\1 & {- 1} & {- 1} & 1 & 1 & {- 1} & {- 1} & 1 \\1 & 1 & 1 & 1 & {- 1} & {- 1} & {- 1} & {- 1} \\1 & {- 1} & 1 & {- 1} & {- 1} & 1 & {- 1} & 1 \\1 & 1 & {- 1} & {- 1} & {- 1} & {- 1} & 1 & 1 \\1 & {- 1} & {- 1} & 1 & {- 1} & 1 & 1 & {- 1}\end{pmatrix}.}$

Therefore, currents flowing through the sense line Sns[1] at times t=1to t=8 are 7.8 μA, 0.2 μA, 0.2 μA, 0.6 μA, 0.2 μA, −0.2 μA, −0.2 μA, and0.2 μA, respectively, in an ideal state which is free from variationamong the element devices and the like.

In the first column of the Hadamard matrix, all the elements are 1;thus, at time t=1, currents flow from all the element devices in thesame direction, leading to an abnormal value. The flow of a large amountof current increases power consumption yet does not affect the result asdescribed below. Therefore, no particular measurement is performed(i.e., the coded signals are not supplied), or even if the coded signalsare supplied, the value is not employed and the current I[1]_(t=1) isconstantly set to 0. The reason for this operation will be describedlater.

The currents at times t=2 to t=8 are measured and converted by an ADconverter. As a result, data 0, 1, 1, 1, 1, −1, −1, and 1 are obtainedas the currents I[1]_(t=1) to I[1]_(t=8) flowing through the sense lineSns[1].

The data stored in the element devices 11 can be calculated bymultiplying the inverse matrix of the Hadamard matrix of order 8 by thecurrents I[1]_(t=1) to I[1]_(t=8). The resulting calculated data are0.375, −0.125, −0.125, 0.375, 0.375, −0.125, −0.125, and −0.125. Here,attention is paid only to whether the values are positive or negative,and a positive value and a negative value are regarded as data “1” and“0”, respectively. That is, data “1”, “0”, “0”, “1”, “1”, “0”, “0”, and“0” are read, which are identical with the data stored.

Alternatively, the element device 11[1,1], the element device 11[2,1],the element device 11[3,1], the element device 11[4,1], the elementdevice 11[5,1], the element device 11[6,1], the element device 11[7,1],and the element device 11[8,1] store second data “0”, “1”, “1”, “0”,“0”, “0”, “0”, and “0”, respectively. The currents flowing through thesense line Sns[1] at times t=1 to t=8 are 7.6 μA, 0 μA, 0 μA, −0.4 μA,0.4 μA, 0 μA, 0 μA, and −0.4 μA, respectively, in an ideal state whichis free from variation among the element devices and the like.

These currents are subjected to AD conversion as described above, anddata 0, 0, 0, −1, 1, 0, 0, and −1 are obtained as the currentsI[1]_(t=1) to [1]_(t=8) flowing through the sense line Sns[1].Calculated data based on the above data are −0.125, 0.375, 0.375,−0.125, −0.125, −0.125, −0.125, and −0.125, and data “0”, “1”, “1”, “0”,“0”, “0”, “0”, and “0” are read.

Although a coefficient ⅛ of the inverse matrix of the Hadamard matrix istaken into consideration in the above calculation, this coefficient canbe ignored. In that case, the calculation involves only addition and/orsubtraction and can be simplified. When the above-described first dataare subjected to calculation with the coefficient ignored, thecalculated data are 3, −1, −1, 3, 3, −1, −1, and −1. When attention ispaid only to whether the values are positive or negative and a positivevalue and a negative value are regarded as data “1” and “0”,respectively, data “1”, “0”, “0”, “1”, “1”, “0”, “0”, and “0” are read,which are identical with the data stored.

<Data Reading Method—Modification 1>

The above method has the disadvantage of not being capable ofdetermining whether data is “1” or “0” when all the element devices 11store the same data. Specifically, calculated data are 0, 0, 0, 0, 0, 0,0, and 0 either when all data are “1” or when they are “0”. Note thatthe other data do not yield such calculated data.

This can be avoided, for example, by constant writing of “1” (or “0”) tothe element device 11[1,1]. In that case, it is the seven elementdevices 11[2,1] to 11[8,1] that can be used by a user. The case ofconstant writing of “1” to the element device 11[1,1] is distinguishablefrom other cases because all calculated data are 0 when data “1” iswritten to all the other element devices.

<Data Reading Method—Modification 2>

In the above-described method, data stored in the element devices 11 areindividually calculated. When data of one element device is known, theother data can be estimated by a relative comparison with the knowndata.

From a feature of the Hadamard matrix of order 8, the current I[1]_(t=1)can be represented by

I[1]_(t=1) =i[1,1]+i[2,1]+i[3,1]+ . . . +i[8,1].

The current value i[1,1] can be represented by

${i\lbrack {1,1} \rbrack} = {\frac{1}{8}{( {{I\lbrack 1\rbrack}_{t = 1} + {I\lbrack 1\rbrack}_{t = 2} + {I\lbrack 1\rbrack}_{t = 3} + \ldots + {I\lbrack 1\rbrack}_{t = 8}} ).}}$

The current value i[2,1] can be represented by

${i\lbrack {2,1} \rbrack} = {\frac{1}{8}{( {{I\lbrack 1\rbrack}_{t = 1} - {I\lbrack 1\rbrack}_{t = 2} + {I\lbrack 1\rbrack}_{t = 3} - \ldots - {I\lbrack 1\rbrack}_{t = 8}} ).}}$

Although each of them is a polynomial including the current I[1]_(t=1),the value of the current I[1]_(t=1) does not necessarily need to beknown as described below when the current value i[1,1] and the currentvalue i[2,1] are compared.

That is, from the current values i[1,1] and i[2,1],

${{i\lbrack {2,1} \rbrack} - {i\lbrack {1,1} \rbrack}} = {{- \frac{1}{4}}( {{I\lbrack 1\rbrack}_{t = 2} + {I\lbrack 1\rbrack}_{t = 4} + {I\lbrack 1\rbrack}_{t = 6} + {I\lbrack 1\rbrack}_{t = 8}} )}$

can be derived. In other words, the current value i[2,1] can berelatively compared with the current value i[1,1]. For example, whendata corresponding to the current value i[1,1] is “1” and the currentvalue i[2,1] is smaller than the current value i[1,1], the correspondingdata can be determined to be “0”, otherwise it is determined to be “1”.It is noteworthy that the equation does not involve the current valueI[1]_(t=1), and this means that the current I[1]_(t=1) can be ignored(or set to 0 in the above subsection <Data reading method Basis>).

This can be further generalized, and a current value i[n,1] of anelement device 11 in the n-th row (n is an integer of 2 to 8) can berepresented by

${{i\lbrack {n,1} \rbrack} = {{i\lbrack {1,1} \rbrack} + {\frac{1}{8}\{ {{( {h_{2,n} - 1} ){I\lbrack 1\rbrack}_{t = 2}} + {( {{h_{3,n}I} - 1} ){I\lbrack 1\rbrack}_{t = 3}} + \ldots + {( {h_{8,n} - 1} ){I\lbrack 1\rbrack}_{t = 8}}} \}}}},$

where h_(2,n), h_(3,n), . . . , h_(8,n) are elements in the second rowand the n-th column to the eighth row and the n-th column, respectively,of the Hadamard matrix of order 8.

Hence,

$\begin{matrix}{\begin{pmatrix}{{i\lbrack {2,1} \rbrack} - {i\lbrack {1,1} \rbrack}} \\{{i\lbrack {3,1} \rbrack} - {i\lbrack {1,1} \rbrack}} \\\vdots \\\vdots \\{{i\lbrack {8,1} \rbrack} - {i\lbrack {1,1} \rbrack}}\end{pmatrix} = {\frac{1}{8}\begin{pmatrix}{h_{2,2} - 1} & {h_{2,3} - 1} & \ldots & \ldots & {h_{2,8} - 1} \\{h_{3,2} - 1} & {h_{3,3} - 1} & \; & \; & \vdots \\\vdots & \; & \vdots & \; & \vdots \\\vdots & \; & \; & \vdots & \vdots \\{h_{8,2} - 2} & \ldots & \ldots & \ldots & {h_{8,8} - 1}\end{pmatrix}\begin{pmatrix}{I\lbrack 1\rbrack}_{t = 2} \\{I\lbrack 1\rbrack}_{t = 3} \\\vdots \\\vdots \\{I\lbrack 1\rbrack}_{t = 8}\end{pmatrix}}} \\{= {{- \frac{1}{4}}\begin{pmatrix}1 & 0 & 1 & 0 & 1 & 0 & 1 \\0 & 1 & 1 & 0 & 0 & 1 & 1 \\1 & 1 & 0 & 0 & 1 & 1 & 0 \\0 & 0 & 0 & 1 & 1 & 1 & 1 \\1 & 0 & 1 & 1 & 0 & 1 & 0 \\0 & 1 & 1 & 1 & 1 & 0 & 0 \\1 & 1 & 0 & 1 & 0 & 0 & 1\end{pmatrix}\begin{pmatrix}{I\lbrack 1\rbrack}_{t = 2} \\{I\lbrack 1\rbrack}_{t = 3} \\\vdots \\\vdots \\{I\lbrack 1\rbrack}_{t = 8}\end{pmatrix}}} \\{= {{- \frac{1}{4}}{{H_{A}\begin{pmatrix}{I\lbrack 1\rbrack}_{t = 2} \\{I\lbrack 1\rbrack}_{t = 3} \\\vdots \\\vdots \\{I\lbrack 1\rbrack}_{t = 8}\end{pmatrix}}.}}}\end{matrix}$

This equation can be used to obtain differences of the current valuesi[2,1] to i[8,1] from the current value i[1,1]. For example, it isassumed that data corresponding to the first data are written to theelement devices 11[2,1] to 11[8,1] and data “1” is constantly written tothe element device 11[1,1]. When the currents flowing through the senseline Sns[1] at times t=2 to t=8 (0 μA, 0 μA, −0.4 μA, 0.4 μA, 0 μA, 0μA, and −0.4 μA) are substituted into the above equation, the differencebetween the current value i[1,1] and each of the current values i[4,1]and i[5,1] is 0 and the difference between the current value i[1,1] andeach of the others is −0.5. This indicates that the element devices11[4,1] and 11[5,1] store data “1” and the other element devices 11store data “0”.

Also in that case, it is the seven element devices 11[2,1] to 11[8,1]that can be used by a user.

The above-described matrix H_(A) with seven rows and seven columns isobtained by replacing −1 with 0 in a submatrix obtained by removing thefirst row and the first column from the Hadamard matrix of order 8.Therefore, a circuit for executing this operation and a procedure of theoperation can be simplified as described later.

In the above-described example, the differences of the current valuesi[2,1] to i[8,1] from the current value i[1,1] are calculated. Ingeneral, polynomials of the current values i[1,1] to i[8,1] have thesame first term (the term of the current I[1]_(t=1)); therefore, thedifference between any two of the current values i[1,1] to i[8,1] can beobtained.

<Data Reading Method—Modification 3>

In the above-described example, the current I is read by an AD converteras any of three values of a positive value, a negative value, and 0.This is because when an even number of element devices 11 of theabove-described eight element devices 11[1,1] to 11[8,1] store the samedata, any of the currents I[1]_(t=2) to I[1]_(t=8) becomes 0. This doesnot occur when an odd number of element devices 11 store the same data;therefore, the current I is read as a positive or negative value,whereby a simpler circuit configuration and a simpler operation can beachieved.

In view of this, any one of the eight element devices 11[1,1] to 11[8,1]is made to store “1” or “0” in accordance with the data of the otherseven element devices 11 so that an odd number of element devices 11store the same data. For example, in the case where the element device11[1,1] is used for this purpose and none of, or an even number of, theother seven element devices 11 store data “1” (i.e., an odd number ofelement devices store data “0”), data “1” is written to the elementdevice 11[1,1]. In the other cases, data “0” is written thereto.

As an inevitable result, not all the elements 11[1,1] to 11[8,1] storethe same data; therefore, the problem described above in the subsection<Data reading method—Modification 1> does not arise. Also in that case,it is the seven element devices 11[2,1] to 11[8,1] that can be used by auser.

This method can further increase the accuracy of reading. For example,it is assumed that data “0”, “0”, “1”, “1”, “0”, “0”, and “0” arewritten to the element device 11[2,1], the element device 11[3,1], theelement device 11[4,1], the element device 11[5,1], the element device11[6,1], the element device 11[7,1], and the element device 11 [8,1],respectively. Since there are an odd number of data “1”, data “1” iswritten to the element device 11[1,1].

Note that the current values of the element device 11[1,1], the elementdevice 11[2,1], the element device 11[3,1], the element device 11[4,1],the element device 11[5,1], the element device 11[6,1], the elementdevice 11[7,1], and the element device 11[8,1] vary and are 1.05 μA,0.93 μA, 0.89 μA, 1.02 μA, 1.07 μA, 0.96 μA, 0.91 μA, and 0.92 μA,respectively.

The amounts of currents flowing through the sense line Sns[1] at timest=1 to t=8 are 7.75 μA (set to 0 as described above), 0.09 μA, 0.27 μA,0.37 μA, 0.03 μA, −0.11 μA, −0.13 μA, and 0.13 μA, respectively. Thesevalues become 0, 1, 1, 1, −1, −1, and 1 as a result of AD conversion orthe like. The resulting calculated data are 0.375, −0.125, −0.125,0.375, 0.375, −0.125, −0.125, and −0.125, and data “1”, “0”, “0”, “1”,“1”, “0” “0” and “0” are read.

Note that this method may be combined with the method described in thesubsection <Data reading method—Modification 2>. For example, referencedata is written to the element device 11[1,1], and data “1” or “0” iswritten to the element device 11[2,1] in accordance with data of theelement device 11[1,1] and the element devices 11[3,1] to 11[8,1].Therefore, it is the element devices 11[3,1] to 11[8,1] that can be usedby a user.

<Data Reading Method—Modification 4>

In contrast to <Data reading method—Modification 3>, the number of data“1” (or data “0”) may be set to an even number. In that case, any of thecurrents I[1]_(t=2) to I[1]_(t=8) is 0, whereas the amount of thecurrent I which is not 0 is 0.4 μA or more. That is, the accuracy of ADconversion can be lowered.

For example, a current of 0.2 μA or more can be determined to be 1, acurrent of −0.2 μA or less can be determined to be −1, and a currenttherebetween can be determined to be 0. The accuracy of AD conversion inthat case is 0.4 μA, which is twice a difference (0.2 μA) between acurrent value based on data “1” and a current value based on data “0”.Note that it is necessary that the current detection accuracy be 0.2 μAor less (a difference in current of 0.2 μA can be detected) in the casewhere data are read individually.

Note that the same applies to the case where the number of data “1” (ordata “0”) is set to an odd number (the difference between any two of thecurrents I[1]_(t=2) to I[1]_(t=8) is 0.4 μA or more in the case wherethe number of data “1” is set to an odd number).

<Correction Method for Asymmetry>

In the above method, the amount of current is assumed to be constant(symmetric) even when the direction of current flow in the magnetictunnel junction element 15 is reversed, but might be asymmetric underthe influence of various factors. For example, in the case where acurrent flows in the negative direction in the element device 11[n,1] (nis an integer of 1 to 8), the amount of current is β_(n,1) (>0) timesthat in the case where a current flows in the positive direction. Inthat case, a correction is made to a Hadamard matrix to be used. Forexample, when a Hadamard matrix of order 8 is used, an element which is−1 is replaced with β_(n,1). A corrected Hadamard matrix H′ isrepresented by

$H^{\prime} = {\begin{pmatrix}1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\1 & {- \beta_{2,1}} & 1 & {- \beta_{4,1}} & 1 & {- \beta_{6,1}} & 1 & {- \beta_{8,1}} \\1 & 1 & {- \beta_{3,1}} & {- \beta_{4,1}} & 1 & 1 & {- \beta_{7,1}} & {- \beta_{8,1}} \\1 & {- \beta_{2,1}} & {- \beta_{3,1}} & 1 & 1 & {- \beta_{6,1}} & {- \beta_{7,1}} & 1 \\1 & 1 & 1 & 1 & {- \beta_{5,1}} & {- \beta_{6,1}} & {- \beta_{7,1}} & {- \beta_{8,1}} \\1 & {- \beta_{2,1}} & 1 & {- \beta_{4,1}} & {- \beta_{5,1}} & 1 & {- \beta_{7,1}} & 1 \\1 & 1 & {- \beta_{3,1}} & {- \beta_{4,1}} & {- \beta_{5,1}} & {- \beta_{6,1}} & 1 & 1 \\1 & {- \beta_{2,1}} & {- \beta_{3,1}} & 1 & {- \beta_{5,1}} & 1 & 1 & {- \beta_{8,1}}\end{pmatrix}.}$

As is apparent from the equation, the value of β_(n,1) can be set foreach of the element devices 11.

An inverse matrix H′⁻¹ of this matrix is represented by

${H^{\prime - 1} = {\frac{1}{8}\begin{pmatrix}\delta_{1} & \delta_{2} & \delta_{3} & \delta_{4} & \delta_{5} & \delta_{6} & \delta_{7} & \delta_{8} \\\gamma_{2,1} & {- \gamma_{2,1}} & \gamma_{2,1} & {- \gamma_{2,1}} & \gamma_{2,1} & {- \gamma_{2,1}} & \gamma_{2,1} & {- \gamma_{2,1}} \\\gamma_{3,1} & \gamma_{3,1} & {- \gamma_{3,1}} & {- \gamma_{3,1}} & \gamma_{3,1} & \gamma_{3,1} & {- \gamma_{3,1}} & {- \gamma_{3,1}} \\\gamma_{4,1} & {- \gamma_{4,1}} & {- \gamma_{4,1}} & \gamma_{4,1} & \gamma_{4,1} & {- \gamma_{4,1}} & {- \gamma_{4,1}} & \gamma_{4,1} \\\gamma_{5,1} & \gamma_{5,1} & \gamma_{5,1} & \gamma_{5,1} & {- \gamma_{5,1}} & {- \gamma_{5,1}} & {- \gamma_{5,1}} & {- \gamma_{5,1}} \\\gamma_{6,1} & {- \gamma_{6,1}} & \gamma_{6,1} & {- \gamma_{6,1}} & {- \gamma_{6,1}} & \gamma_{6,1} & {- \gamma_{6,1}} & \gamma_{6,1} \\\gamma_{7,1} & \gamma_{7,1} & {- \gamma_{7,1}} & {- \gamma_{7,1}} & {- \gamma_{7,1}} & {- \gamma_{7,1}} & \gamma_{7,1} & \gamma_{7,1} \\\gamma_{8,1} & {- \gamma_{8,1}} & {- \gamma_{8,1}} & \gamma_{8,1} & {- \gamma_{8,1}} & \gamma_{8,1} & \gamma_{8,1} & {- \gamma_{8,1}}\end{pmatrix}}},\mspace{20mu} {where}$$\mspace{20mu} {\gamma_{n,1} = \frac{2}{1 + \beta_{n,1}}}$   and$\mspace{20mu} {\delta_{1} = {8 - {\sum\limits_{n = 2}^{8}{\gamma_{n,1}.}}}}$

Note that δ₂ to δ₈ are each a value with which the sum of elements inthe corresponding column becomes 0:

δ₂−γ_(2,1)+γ_(3,1)−γ_(4,1)+γ_(5,1)−γ_(6,1)+γ_(7,1)−γ_(8,1)=0

δ₃−γ_(2,1)−γ_(3,1)−γ_(4,1)+γ_(5,1)+γ_(6,1)−γ_(7,1)+γ_(8,1)=0

δ₄−γ_(2,1)−γ_(3,1)−γ_(4,1)+γ_(5,1)−γ_(6,1)−γ_(7,1)+γ_(8,1)=0

δ₅+γ_(2,1)+γ_(3,1)−γ_(4,1)−γ_(5,1)−γ_(6,1)−γ_(7,1)−γ_(8,1)=0

δ₇−γ_(2,1)−γ_(3,1)−γ_(4,1)+γ_(5,1)−γ_(6,1)−γ_(7,1)−γ_(8,1)=0

δ₈−γ_(2,1)−γ_(3,1)−γ_(4,1)+γ_(5,1)−γ_(6,1)+γ_(7,1)+γ_(8,1)=0

As is apparent from the inverse matrix, the current value i[n,1] (n isan integer of 2 to 8) is obtained by multiplying the added and/orsubtracted values of the measured currents I (which is the same as inthe subsection <Data reading method—Basis>) by a correction valueγ_(k,1) (>0). The multiplication by the correction value γ_(k,1) doesnot cause inversion between the positive and negative signs; thus, thecorrection value γ_(k,1) can be regarded as 1 in the case of simplyhandling digital data. However, the correction value γ_(k,1) cannot beignored in the case of handling multi-level data or analog data asdescribed later.

Whether an element of an inverse matrix is positive or negativecorresponds to that in a Hadamard matrix. That is, whether an element ina k-th row and a j-th column (k is an integer of 2 to 8, and j is aninteger of 1 to 8) of an inverse matrix is positive or negative is thesame as whether an element in the k-th row and the j-th column of aHadamard matrix is positive or negative.

Note that the formula to calculate the current value i[1,1] is complex.However, there is no need to obtain the current value i[1,1] of theelement device 11[1,1] if the element device 11[1,1] is used only towrite particular data as described in the subsections <Data readingmethod—Modification 1> to <Data reading method—Modification 3>.

<Multi-Level- or Analog-Data Reading Method>

If the element devices 11 can store multi-level data, the data can alsobe read. For example, when storing data “0”, “1”, “2”, and “3”, theelement devices 11 allow the flow of currents of 0.9 μA, 1.1 μA, 1.3 μA,and 1.5 μA, respectively. Here, there is no variation among the elementdevices.

Note that in the following description, data is obtained by comparisonbetween data of the element device 11[1,1] and that of each of the otherelement devices 11 as described in the subsection <Data readingmethod—Modification 2>. Here, the element device 11[1,1] constantlystores data “0”.

For example, the element devices 11[1,1] to 11[8,1] store “0”, “1”, “3”,“1”, “2”, “2”, “3”, and “0”, respectively. That is, differences of thecurrent values i[2,1] to i[8,1] from the current value i[1,1] are 0.2μA, 0.6 μA, 0.2 μA, 0.4 μA, 0.4 μA, 0.6 μA, and 0 μA, respectively.

As described above in the subsection <Data reading method—Basis>,currents flowing through the sense line Sns[1] at times t=1 to t=8 are9.6 μA, 0.8 μA, −0.4 μA, −1.2 μA, −0.4 μA, −0.4 μA, −0.8 μA, and 0 μA,respectively. As in the subsection <Data reading method—Basis>, thecurrent I[1]_(t=1) is set to 0. The currents I[1]_(t=2) to I[1]_(t=8)are obtained by AD conversion of the currents flowing through the senseline Sns[1]. An accuracy (an increment in current) of 0.2 μA issufficient for the AD conversion, and even twice the value does notcause an error.

First, the accuracy of the AD conversion is set to 0.2 μA. The currentsI[1]_(t=2) to I[1]_(t=8) obtained by dividing the currents flowingthrough the sense line Sns[1] by 0.2 μA are 4, −2, −6, −2, −2, −4, and0, respectively. That is, the currents I[1]_(t=1) to I[1]_(t=8) are 0,4, −2, −6, −2, −2, −4, and 0.

The current values i[1,1] to i[8,1] obtained by multiplying the inversematrix of the Hadamard matrix of order 8 by the currents I[1]_(t=1) toI[1]_(t=)8 are −1.5, −0.5, 1.5, −0.5, 0.5, 0.5, 1.5, and −1.5.Differences of the current values i[2,1] to i[8,1] from the currentvalue i[1,1] are 1, 3, 1, 2, 2, 3, and 0, and values obtained bymultiplying these differences by 0.2 μA are 0.2, 0.6, 0.2, 0.4, 0.4,0.3, and 0. These values are the same as the current values presentedabove, meaning that data can be read from the current values I[1]_(t=1)to I[1]_(t=8) obtained by AD conversion of the currents flowing throughthe sense line Sns[1].

Next, the accuracy of the AD conversion is lowered to 0.4 μA. Thecurrents I[1]_(t=2) to I[1]_(t=8) obtained by dividing the currentsflowing through the sense line Sns[1] by 0.4 μA are 2, −1, −3, −1, −1,−2, and 0, respectively. That is, the currents I[1]_(t=1) toI[1]I[1]_(t=8) are 0, 2, −1, −3, −1, −1, −2, and 0.

The current values i[1,1] to i[8,1] obtained by multiplying the inversematrix of the Hadamard matrix of order 8 by the currents I[1]_(t=1) toI[1]_(t=)8 are −0.75, −0.25, 0.75, −0.25, 0.25, 0.25, 0.75, and −0.75.Differences of the current values i[2,1] to i[8,1] from the currentvalue i[1,1] are 0.5, 1.5, 0.5, 1, 1, 1.5, and 0, and values obtained bymultiplying these differences by 0.4 μA are 0.2, 0.6, 0.2, 0.4, 0.4,0.3, and 0. These values are the same as the current values presentedabove, meaning that data can be read from the current values I[1]_(t=1)to I[1]_(t=8) obtained by AD conversion of the currents flowing throughthe sense line Sns[1].

These results are obtained because none of the differences of thecurrents I[1]_(t=2) to I[1]_(t=8) is less than 0.4 μA. For example, acurrent I[1]_(t=j1) and a current I[1]_(t=j2) (j1 and j2 are each aninteger of 2 to 8, and j1≠j2) are represented by

I[1]_(t=j1) =i[1,1]+h _(j1,2) i[2,1]+h _(j1,3) i[3,1]+ . . . +h _(j1,8)i[8,1]

and

I[1]_(t=j2) =i[1,1]+h _(j2,2) i[2,1]+h _(j2,3) i[3,1]+ . . . +h _(j2,8)i[8,1].

Hence,

I[1]_(t = j 1) − I[1]_(t = j 2) = (h_(j 1, 2) − h_(j 2, 2))i[2, 1] + (h_(j 1, 3) − h_(j 2, 3))i[3, 1] + … + (h_(j 1, 8) − h_(j 2, 8))i[8, 1].

In a polynomial on the right side of the equation, coefficients of thecurrent values i[2,1] to i[8,1] are differences between elements of theHadamard matrix. Since the elements of the Hadamard matrix are either 1or −1, the coefficients are −2, 0, or 2. Therefore, the differencebetween the current I[1]_(t=j1) and the current I[1]_(t=j2) is two ormore times the increment of the current values i[2,1] to i[8,1].

In the above example, the element devices 11 can store four-level data,and the same applies to the case of storing analog data. Here, thecurrent value i of current flowing in the element device 11 is in therange of 0.9 μA to 1.1 μA. Specifically, the current values i[2,1] toi[8,1] are determined using a random number generating function, andthese values are used to calculate currents that are output inaccordance with coded signals based on the Hadamard matrix of order 8and that flow through the sense line Sns[1]. Note that the current valuei[1,1] is 0.9 μA. Single-digit figures obtained by dividing these valuesby 0.1 μA (i.e., the accuracy of current measurement is 0.1 μA) are thecurrents I[1]_(t=2) to I[1]_(t=8). Note that the current I[1]_(t=1) is0. Data obtained by multiplying the difference between and the currentvalue i[1,1] and each of the current values i[2,1] to i[8,1] by 0.1 μAis read analog data.

For example, when the current values i[1,1] to i[8,1] are 0.900, 1.045,1.065, 1.047, 1.034, 0.959, 1.004, and 0.982 (the differences (truevalues) of the current values i[2,1] to i[8,1] from the current valuei[1,1] are 0.145, 0.165, 0.147, 0.134, 0.059, 0.104, and 0.082),digitized values of the currents I[1]_(t=1) to I[1]_(t=8) are 0, 0, 2,1, 1, 2, 2, and −2. Values obtained by multiplying the differences ofthe current values i[2,1] to i[8,1] from the current value i[1,1], whichare obtained from the digitized values of the currents I, by 0.1 μA are0.125 μA, 0.175 μA, 0.150 μA, 0.125 μA, 0.125 μA, 0.050 μA, and 0.100μA. A comparison between these values and the above true values showsthat these values deviate from the true values by 0.008 μA on average.This corresponds to approximately 7% of the average of the true valuesand 8% of the resolution.

The deviation is smaller than that in the case of individually measuringcurrents flowing in the element devices 11[1,1] to 11[8,1]. In the caseof individually measuring currents, when the accuracy of measurement is0.1 μA, the differences of the current values i[2,1] to i[8,1] from thecurrent value i[1,1] are 0.1 μA, 0.2 μA, 0.1 μA, 0.1 μA, 0.1 μA, 0.1 μA,and 0.1 μA, which deviate from the true values by 0.028 μA on average.This corresponds to approximately 23% of the average of the true valuesand 28% of the resolution.

Note that the deviation is further decreased by increasing the order ofthe Hadamard matrix. For example, when a similar operation is performedwith a Hadamard matrix of order 256 and with 256 current values iincluding the above eight current values i[1,1] to i[8,1], thedifferences of the current values i[2,1] to i[8,1] from the currentvalue i[1,1] deviate from the true values thereof by 0.0012 μA onaverage. This corresponds to approximately 1% of the average of the truevalues.

By such coded signals using a Hadamard matrix of order N, data can bereproduced at an accuracy higher than that of AD conversion (in theabove example, 0.1 μA). Data are generally reproducible at an accuracyas high as a fraction of the square root of N of that of AD conversion.Ideally, in the case where N=8, data can be reproduced at an accuracy ashigh as approximately 1/2.8 of that in the case where N=1 (i.e., thecase of individually measuring current values i flowing in the elementdevices 11). In the above example, the deviation in the case where N=8is approximately 1/3.5 of that in the case where N=1. The deviation inthe case where N=256 is approximately 1/23.

This also means that the accuracy of AD conversion may be lowered when aHadamard matrix of higher order is used. For example, in the case whereN=256, even when the resolution is 0.5 μA, data can be read at anaccuracy comparable to, or higher than, that in the case where N=8 andthe resolution is 0.1 μA. An actual numerical experiment conducted at anaccuracy of AD conversion of 0.5 μA has shown that the average ofdeviations from true values is 0.004 μA. This value is smaller than thevalue in the above-described case where N=8 (0.008 μA). In the casewhere the accuracy of AD conversion is 1 μA, the accuracy of reading canbe estimated to be four times that in the case where the accuracy of ADconversion is 0.5 μA. An actual numerical experiment has shown that theaverage of deviations from true values is 0.016 μA. This value isinferior to the value in the case where N=8 and the accuracy of ADconversion is 0.1 μA, but is superior to the value in the case where N=1and the accuracy of AD conversion is 0.1 μA (i.e., the case ofindividually measuring values).

In this manner, as the scale of the Hadamard matrix increases, theaccuracy of calculation can be increased and the accuracy of ADconversion can be decreased. In the above example, it has been shownthat data can be reproduced within an error of several percent withrespect to a true value even when AD conversion is conducted in anincrement (0.5 μA) larger than the amount of change in the current valuei (0.2 μA). Note that the subsection <Correction method for asymmetry>can also be applied in handling multi-level data and analog data.

<Arithmetic Circuit of Matrix Device>

In the matrix device 10, as described above, the second physicalquantities can be obtained by supplying coded signals to the pluralityof element devices 11 through the drive lines Drv, conducting ADconversion or the like to quantify the first physical quantity output tothe sense line Sns from the element devices 11 in accordance with thecoded signals, and multiplying an inverse matrix (including itscorrected matrix) of the Hadamard matrix (including a similar matrix, aderived matrix, and the like) by the quantified values. The secondphysical quantities may be further subjected to numerical processing.Some or all of these operations may be executed using an existingarithmetic device and existing software, but can be executed using adedicated device added to the matrix device.

FIG. 4A illustrates an example of an electronic device including aperipheral circuit for driving the matrix device 10 with eight rows andseven columns Signals are applied to the drive lines Drv[1] to Drv[8]from the signal generation circuit 21. The signal generation circuit 21can output coded signals based on the Hadamard matrix. For example, thecoded signals may be stored in a ROM or the like.

A current(s) flowing through one of, some of, or all of the sense linesSns[1] to Sns[7] is converted to a current(s) I having a digitalvalue(s) by a detecting circuit 23. The current I is input to a decoder24 through a data line Dta. The signals of the drive lines Drv[1] toDrv[8] are also input to the decoder 24. The current I is decoded by thedecoder 24 and is then output.

Note that in the case of employing the method described in thesubsection <Data reading method—Modification 2>, since the matrix forcalculating the second physical quantities is obtained by replacing −1with 0 in a submatrix obtained by removing the first row and the firstcolumn from the Hadamard matrix, coded signals corresponding to thefirst row of the Hadamard matrix (the signal input to the drive lineDrv[1]) is not used for the calculation. For this reason, the signal ofthe drive line Drv[1] is not necessarily input to the decoder 24 as inan electronic device illustrated in FIG. 4B.

FIG. 5 illustrates configurations of the detecting circuit 23 and thedecoder 24 in the case of inputting a signal from the signal generationcircuit 21 via the demultiplexer 22 to the matrix device 10 asillustrated in FIG. 3B. A current from the matrix device 10 is input tothe detecting circuit 23 and converted to a current I having a digitalvalue. The current I is input to the decoder 24 through the data lineDta. In addition, the signals from the signal generation circuit 21 areinput to the decoder 24 through a delay circuit 25. Note that the delaycircuit 25 is not necessarily provided. In the case of employing themethod described in the subsection <Data reading method—Modification 2>,a signal output from the signal generation circuit 21 to a terminalTrm[1] is not necessarily input to the decoder 24.

In this manner, the signals of the signal generation circuit 21 (or thesignals of the drive lines Drv[1] to Drv[8]) can be used for decoding.In the case of calculating the second physical quantities by decodingthe first physical quantity (such as a current) that is output inaccordance with the coded signals of the Hadamard matrix, the inversematrix of the Hadamard matrix is used. Since the inverse matrix has thesame structure as the original matrix, operations can be simplified.This will be described below. Note that the following descriptionapplies to not only the Hadamard matrix but also all matrices whoseinverse matrices are multiples thereof

For example, signals applied to the drive line Drv[n] (n is an integerof 1 to 8) are h_(1,n) at time t=1, h_(2,n) at time t=2, h_(3,n) at timet=3, . . . , h_(8,n) at time t=8.

Currents flowing through the sense line Sns[m] (in is an integer of 1 to7) are I[m]_(t=1) at time t=1, I[m]_(t=2) at time t=2, I[m]_(t=3) attime t=3, . . . , I[m]_(t=8) at time t=8.

A formula for calculating a current value i[n,m] using the currentsI[m]_(t=1) to I[m]_(t=8) is represented by

${i\lbrack {n,m} \rbrack} = {\frac{1}{8}{( {{h_{1,n}{I\lbrack m\rbrack}_{t = 1}} + {h_{2,n}{I\lbrack m\rbrack}_{t = 2}} + {h_{3,n}{I\lbrack n\rbrack}_{t = 3}} + \ldots + {h_{8,n}{I\lbrack m\rbrack}_{t = 8}}} ).}}$

For a relative comparison between the element devices 11, ⅛ may beregarded as 1. Hence,

i[n,m]=h _(1,n) I[m] _(t=1) +i[n,m]=h _(2,n) I[m] _(t=2) +i[n,m]=h_(3,n) I[m] _(t=3) + . . . +i[n,m]=h _(8,n) I[m] _(t=8).

Since h_(1,n), h_(2,n), h_(3,n), . . . , h_(8,n) are either 1 or −1,this formula means sequentially adding and/or subtracting the currentsI[m]_(t=1) to I[m]_(t=8) based on h_(1,n), h_(2,n), h_(3,n), . . .h_(8,n). That is, when h_(k,n) (k is an integer of 1 to 8) is 1,addition is performed, and when it is −1, subtraction is performed.Alternatively, when h_(k,n) is 1, a value is added as it is, and when itis −1, a value with an inverted sign is added. In the formula, the orderwhere h_(1,n), h_(2,n), h_(3,n), . . . , h_(8,n) appear is the same asthe order of coded signals applied to the drive line Drv[n].

In the case where the currents I[m]_(t=1) to I[m]_(t=8) are either oftwo digital values (i.e., either 1 or −1), addition is performed whenh_(k,n) (k is an integer of 1 to 8) is 1, and no operation needs to beperformed when it is −1. This is because this operation is the same asan operation of subtracting 8 from the result of an operation of adding2 when h_(k,n) is 1 and performing no operation when it is −1.

Here, assuming that the current I[m]_(t=1) is obtained when the signalof the drive line Drv[n] is h_(1,n), the first term (h_(1,n)I[m]_(t=1))of the above formula can be determined using h_(1,n). The first term isstored by some means. Since h_(1,n) is 1 in the Hadamard matrix createdby Sylvester's method, the current I[m]_(t=1) may be stored. Note thatthe current I[m]_(t=1) may be constantly 0 as described above.

Next, assuming that the current I[m]_(t=2) is obtained when the signalof the drive line Drv[n] is h_(2,n), an operation of either adding thecurrent I[m]_(t=2) to the stored first term (when h_(2,n), is 1) orsubtracting the current I[m]_(t=2) therefrom (when h_(2,n) is −1) isexecuted in accordance with h_(2,n). By this stage, the sum of the firstand second terms of the above formula is obtained. The result is stored.The previously stored first term may be overwritten because it is notused after this.

Next, assuming that the current I[m]_(t=3) is obtained when the driveline Drv[n] is h_(3,n), an operation of either adding the currentI[m]_(t=3) to the stored result of the first term and/or the second termor subtracting the current I[m]_(t=3) therefrom is executed inaccordance with h_(3,n). At this stage, the sum of the first to thirdterms of the above formula is obtained. The result is stored. Afterthat, the operation of adding or subtracting a current I[m] to or fromthe stored results and then storing the result is similarly repeated,whereby the above formula can be obtained.

Whether the current I[m] is added or subtracted is determined using thesignal of the drive line Drv[n] in the above-described example ofoperation. In the case where there is a delay in outputting the currentI[m], the same operation can be performed using a signal obtained bydelaying the signal of the drive line Drv[n] with a delay circuit or thelike in accordance with the delay. Since operations are successivelyperformed as described above, the required storage capacity can bereduced and the processing speed can be increased.

FIG. 6A illustrates an example of the decoder 24. The decoder 24includes arithmetic circuits 26[1] to 26[8], and the current I (adigital value) output from the detecting circuit 23 is input to thearithmetic circuits 26[1] to 26[8] through the data line Dta. Inaddition, each of the arithmetic circuits 26[1] to 26[8] receives asignal of the corresponding one of the drive lines Drv[1] to Drv[8].Note that the arithmetic circuit 26[1] is not necessarily provided inthe case of employing the method described in the subsection <Datareading method—Modification 2>.

FIG. 6B illustrates an example of the decoder 24 capable ofsimultaneously decoding all the current values i of the 56 elementdevices 11 in the matrix device 10 with eight rows and seven columns.That is, seven currents I[1] to I[7] can be simultaneously input to thedecoder 24 through data lines Dta[1] to Dta[7]. The decoder 24 includes56 arithmetic circuits 26[1,1] to 26[8,7], each of which receives asignal of the corresponding one of the drive lines Drv[1] to Drv[8].

FIG. 7A illustrates a basic configuration example of the arithmeticcircuit 26. The arithmetic circuit 26 includes a logic portion 27 and amemory 28. The current I (a digital value) is input to the logic portion27 through the data line Dta. In addition, the signal of the data lineDrv (in FIG. 7A, the drive line Drv[2]) is input to the logic portion27. Furthermore, data stored in the memory 28 is input to the logicportion 27. The logic portion 27 performs an operation based on theseinputs, and the memory 28 stores the operation result. The operationresult can be output to the outside.

An example of the operation process will be described with reference toa flowchart in FIG. 7B. Here, the current value i[2,1] will be obtained.Initially (at t=0), the current value i[2,1] is 0. First, t is increasedby 1. Next, whether the signal of the drive line Drv[2] at that time isH (i.e., 1) or L (i.e., −1) is determined. When the signal is H, thecurrent value i[2,1] is a value obtained by adding the current I to themost recent current value i[2,1] (that is stored in the memory 28). Whenthe signal is L, the current value i[2,1] is a value obtained bysubtracting the current I from the most recent current value i[2,1].

Note that in the case of employing the method described in thesubsection <Data reading method—Modification 2>, the same applies whenthe signal is H, but the current value i[2,1] is not subjected to thesubtraction when the signal is L. This is because the correspondingelement in the matrix H_(A) is 0.

The arithmetic circuit 26 illustrated in FIG. 7A can be utilized notonly in the case where the current value i (or the corresponding data)is binary data but also in the case where it is multi-level data oranalog data. When the current value i corresponds to binary orthree-level data, an operation can be more easily executed using anarithmetic circuit 26 illustrated in FIG. 8A.

The arithmetic circuit 26 illustrated in FIG. 8A includes the logicportion 27, a first counter 29_1, a second counter 29_2, and acomparator 30. The signal of the drive line Drv[2] and the signal of thedata line Dta (the current I, a digital value) are input to the logicportion 27. Outputs of the logic portion 27 are input to the firstcounter 29_1 and the second counter 29_2. The comparator 30 has afunction of comparing outputs of the first counter 29_1 and the secondcounter 29_2.

The first counter 29_1 and the second counter 29_2 have a function ofcounting the number of input signals (either H or L). The first counter29_1 and the second counter 29_2 may each be an 8-bit memory because thelogic portion 27 outputs an H or L signal eight times as describedbelow.

The logic portion 27 calculates the product of the signal of the driveline Drv[2] and the signal of the data line Dta at that time. Signalsare applied to the drive line Drv[2] at eight times t=1 to t=8. Thecurrents I based on the signals (each value corresponding to −1, 0, or 1in the method described in the subsection <Data reading method—Basis> oreach value corresponding to −1 or 1 in the method described in thesubsection <Data reading method—Modification 3>) are supplied to thelogic portion 27 through the data line Dta. Outputs (H or L) of thelogic portion 27 at each time are input to the first counter 29_1 andthe second counter 29_2.

After time t=8, the comparator 30 counts and compares the numbers ofsignals output from the first counter 29_1 and the second counter 29_2and outputs the result. For example, the comparator 30 outputs 1 whenthe number of either H or L signals output from the first counter 29_1is larger than that output from the second counter 29_2, otherwise itoutputs 0. This data corresponds to the current value i.

FIG. 8B illustrates an example of the logic portion 27 which can beemployed for the method described in the subsection <Data readingmethod—Basis>. Here, the data line Dta for inputting signals to thelogic portion 27 includes a data line Dta+ and a data line Dta−. Thedetecting circuit 23 digitizes a current flowing through the sense lineSns and outputs any of three values of 1, 0, and −1 as described in thesubsection <Data reading method—Basis>. Accordingly, the detectingcircuit 23 outputs H to the data line Dta+ when the current I is 1 andoutputs L to the data line Dta+ when the current I is 0 or −1.Similarly, the detecting circuit 23 outputs H to the data line Dta− whenthe current I is −1 and outputs L to the data line Dta− when the currentI is 0 or 1.

The logic portion 27 illustrated in FIG. 8B includes AND gates AND1 toAND4 which correspond to four combinations of the data line Dta+ or thedata line Dta− with the drive line Drv[2] or its inverted signal. Thatis, when both the data line Dta+ and the drive line Drv[2] are H, onlythe AND gate AND1 outputs H and the others output L. When the data lineDta− is H and the drive line Drv[2] is H, only the AND gate AND2 outputsH. When the data line Dta− is H and the drive line Drv[2] is L, only theAND gate AND3 outputs H and the others output L. When the data line Dta+is H and the drive line Drv[2] is L, only the AND gate AND4 outputs Hand the others output L.

Outputs of the AND gates AND1 and AND3 are input to an OR gate OR1. Anoutput of the OR gate OR1 is input to the first counter 29_1 through atransfer gate TG1 (synchronous with a clock signal CLK1). Outputs of theAND gates AND2 and AND4 are input to an OR gate OR2. An output of the ORgate OR2 is input to the second counter 29_2 through a transfer gate TG2(synchronous with a clock signal CLK2). Note that the clock signal CLK1and the clock signal CLK2 may be the same signal.

Note that an AND gate generally has an inverted output of a NAND gate,and an OR gate has an inverted output of a NOR gate. Thus, asillustrated in FIG. 9A, a modification can be made by replacing the ANDgates AND1 to AND4 with NAND gates NAND1 to NAND4 and the OR gates OR1and OR2 with NOR gates NOR1 and NOR2.

In general CMOS logic, each of AND and OR gates requires sixtransistors, whereas each of NAND and NOR gates requires only fourtransistors and are advantageous in terms of integration. The presentinvention is not limited thereto, and the logic portion 27 can bemodified by setting signals of the data line Dta+, the data line Dta−,and the drive line Drv[2] and data counted by the first counter 29_1 andthe second counter 29_2 as appropriate.

For example, NOR gates NOR3 to NOR6 may be used as illustrated in FIG.9B in the case where the detecting circuit 23 outputs L to the data lineDta+ when the current I is 1, outputs H to the data line Dta+ when thecurrent I is 0 or −1, outputs L to the data line Dta− when the current Iis −1, and outputs H to the data line Dta− when the current I is 0 or 1.

In FIG. 9B, outputs of the NOR gates NOR1 and NOR2 are output afterbeing inverted by inverters INV1 and INV2 which are synchronous with theclock signals CLK1 and CLK2, respectively, but may be output throughtransfer gates as illustrated in FIG. 9A.

Note that a circuit is simpler in the case of using the method describedin the subsection <Data reading method—Modification 2>. Since elementsof the matrix H_(A) are either 1 or 0 in this method, each of thenumbers of Hs and Ls for the current I with the signal of the drive lineDrv being H may be counted. That is, the value of the current I with thesignal of the drive line Drv being L may be ignored.

FIG. 10A illustrates a circuit example of the logic portion 27 which canbe employed for this method. Here, the AND gate AND1 outputs H when boththe drive line Drv[2] and the data line Dta+ are H. The AND gate AND2outputs H when both the drive line Drv[2] and the data line Dta− are H.Therefore, the output of the AND gate AND1 is output to the firstcounter 29_1, and the output of the AND gate AND2 is output to thesecond counter 29_2.

FIG. 10B is a modification of FIG. 10A, which is made by replacing theAND gate AND1, the AND gate AND2, the transfer gate TG1, and thetransfer gate TG2 with the NAND gate NAND1, the NAND gate NAND2, theinverter INV1, and the inverter INV2, respectively.

The arithmetic circuit 26, the logic portion 27, and the likeillustrated in FIGS. 8A to 10B can be employed for the method describedin the subsection <Data reading method—Modification 3>. However, sincethe current I is either 1 or −1 in the method described in thesubsection <Data reading method—Modification 3>, the arithmetic circuit26, the logic portion 27, and the like having simpler circuitconfigurations may be used.

FIG. 11A illustrates a configuration of the arithmetic circuit 26 whichcan be used for the method described in the subsection <Data readingmethod—Modification 3>. The arithmetic circuit 26 illustrated in FIG.11A includes the logic portion 27, the counter 29, and the comparator30. The signal of the drive line Drv[2] and the signal of the data lineDta (the current I) are input to the logic portion 27. An output of thelogic portion 27 is counted by the counter 29. An output of the counter29 is compared with a reference value by the comparator 30.

The logic portion 27 calculates the product of the signal of the driveline Drv[2] and the signal of the data line Dta at that time. That is,when the signal of the drive line Drv[2] is the same as the signal ofthe data line Dta, one of H and L signals is transmitted to the counter29. When the signal of the drive line Drv[2] is different from thesignal of the data line Dta, the other of the H and L signals istransmitted to the counter 29. Such an operation can be executed usingan XOR gate.

In another method, when the signal of the drive line Drv[2] is the sameas the signal of the data line Dta, one of H and L signals istransmitted to the counter 29, otherwise no signal is transmitted to thecounter 29. In still another method, when the signal of the drive lineDrv[2] is different from the signal of the data line Dta, one of H and Lsignals is transmitted to the counter 29, otherwise no signal istransmitted to the counter 29.

A signal is applied to the drive line Drv[2] at eight times t=1 to t=8.The current I based on the signal is supplied to the logic portion 27through the data line Dta. An output of the logic portion 27 at eachtime is input to the counter 29. The counter 29 counts the number ofeither H or L signals.

After time t=8, the comparator 30 compares the number of either H or Lsignals output from the counter 29 with the reference value. Forexample, the comparator 30 outputs 1 when the number of either H or Lsignals stored in the counter 29 is 5 or more, otherwise it outputs 0.This data corresponds to the current value i.

FIG. 11B illustrates an example of the logic portion 27. The detectingcircuit 23 outputs one of two values of 1 and −1 as described in thesubsection <Data reading method—Modification 3> when digitizing acurrent flowing through the sense line Sns. Accordingly, the detectingcircuit 23 outputs H to the data line Dta when the current I is 1 andoutputs L to the data line Dta when the current I is −1.

The logic portion 27 illustrated in FIG. 11B includes an XOR gate XOR1.The XOR gate XOR1 outputs L when both the data line Dta and the driveline Drv[2] are H or L, otherwise it outputs H. An output of the XORgate XOR1 is output after being inverted by the inverter INV1 which issynchronous with the clock signal CLK1.

The logic portion 27 is not limited to the one illustrated in FIG. 11B,and the logic portion 27 can be modified by setting signals of the dataline Dta and the drive line Drv[2] and data counted by the counter 29 asappropriate. For example, as illustrated in FIG. 11C, when the detectingcircuit 23 digitizes a current flowing through the sense line Sns, L maybe output to the data line Dta in the case where the current I is 1 andH may be output to the data line Dta in the case where the current I is−1. In that case, the output of the XOR gate XOR1 is output to thecounter 29 through the transfer gate TG1 which is synchronous with theclock signal CLK1.

Note that a circuit is simpler in the case of employing the methoddescribed in the subsection <Data reading method—Modification 2>. Sinceelements of the matrix H_(A) are either 1 or 0 in this method, only thenumber of Hs for the current I with the signal of the drive line Drvbeing H may be counted. Thus, as illustrated in FIG. 11D, the signal ofthe drive line Drv[2] and the signal (a digital value) of the data lineDta are input to the AND gate AND1, and its output is counted by thefirst counter 29_1 through the transfer gate TG1.

Note that this circuit is obtained by removing a portion relating to theAND gate AND2 from the logic portion illustrated in FIG. 10A. Thus, amodification can be made by replacing the AND gate with a NAND gate andthe transfer gate with an inverter as illustrated in FIG. 10B.

Although a memory cell is given above as an example of the elementdevice 11, the present invention is not limited thereto. For example, aphotoresistor whose resistance changes with electromagnetic waves (suchas visible light) may be used as the element device 11. In the casewhere a plurality of photoresistors are irradiated with spatiallyinhomogeneous electromagnetic waves, the resistances of thephotoresistors vary with the intensity of the electromagnetic waves inthe corresponding portion. Therefore, currents with different valuesflow in the photoresistors. Thus, the resistances of the photoresistorscan be calculated by the above-described method. Accordingly, thedistribution of the intensity of electromagnetic waves, i.e., an image,can be obtained.

Besides, the above method can be applied to, for example, measurement ofcharacteristics of pixels (e.g., saturation current values oftransistors used) in a display device or an image detecting device (animage sensor).

Embodiment 2

By the method described in the subsection <Data readingmethod—Modification 2> or <Multi-level- or analog-data reading method>in Embodiment 1, relative values can be calculated using one of theelement devices 11 connected to the same sense line Sns as a reference.However, because of that, one element device 11 for each sense line Snscannot store data (i.e., cannot be used by a user). FIG. 12 illustratesan example of a matrix device which overcomes this disadvantage.

A matrix device 12 illustrated in FIG. 12 includes a total of 56 elementdevices 11 arranged in eight rows and seven columns (element devices11[1,1] to 11[8,7]) and an element device 11[1,0] serving as areference.

The element devices 11 in the first row (the element devices 11[1,0] to11[1,7]) change first physical quantities (for example, the current I)of sense lines Sns[0] to Sns[7] in accordance with signals of drivelines Drv[1,0] to Drv[1,7], respectively.

The element devices 11 in the second to eighth rows (the element devices11[2,1] to 11[8,7]) change first physical quantities (for example, thecurrent I) of the sense lines Sns[1] to Sns[7] in accordance withsignals of drive lines Drv[2] to Drv[8], respectively.

The sense lines Sns[0] to Sns[7] can be separately put in a state ofbeing electrically insulated from electric elements other than theelement devices 11 connected to the respective wirings and from otherwirings (i.e., a floating state). The sense lines Sns[0] to Sns[7] canbe connected to each other when switches SW[0] to SW[7] are turned on.An example of a method of operation will be described below.

In a state where the switches SW[0] to SW[7] are off, second physicalquantities of the element devices 11[1,1] to 11[8,7] are calculated by amethod similar to the method described in the subsection <Data readingmethod—Modification 2> or <Multi-level- or analog-data reading method>.

At that time, signals corresponding to the first row of a Hadamardmatrix are applied to the drive lines Drv[1,1] to Drv[1,7]. Signalscorresponding to the second to eighth rows of the Hadamard matrix areapplied to the drive lines Drv[2] to Drv[8], respectively.

As a result, a difference between the second physical quantity of theelement device 11[n,m] (n is an integer of 2 to 8, and m is an integerof 1 to 7) and the second physical quantity of the element device11[1,m] is obtained.

Next, a difference between the second physical quantity of the elementdevice 11[1,m] and the second physical quantity of the element device11[1,0] is obtained by applying the signals corresponding to the firstto eighth rows of the Hadamard matrix to the drive lines Drv[1,0] toDrv[1,7], respectively, in a state where the switches SW[0] to SW[7] areon.

Then, a first physical quantity of any of the sense lines Sns[0] toSns[7] at each time is measured. The thus measured physical quantity isused to obtain the difference between the second physical quantity ofthe element device 11[1,m] and the second physical quantity of theelement device 11[1,0]. When the second physical quantity of the elementdevice 11[1,0] is known, the second physical quantity of the elementdevice 11[1,m] can be found, and furthermore, the second physicalquantity of the element device 11[n,m] can be found.

FIG. 13A illustrates an example of an electronic device including aperipheral circuit for driving the matrix device 12. In FIG. 13A, thesignal generation circuit 21 outputs signals based on a Hadamard matrixfrom eight terminals Trm[1] to Trm[8]. Here, signals based on theelements in the first to eighth rows of a Hadamard matrix of order 8 areoutput from the terminals Trm[1] to Trm[8], respectively.

The outputs from the terminals Trm[2] to Trm[8] are input to the matrixdevice 12 through the drive lines Drv[2] to Drv[8]. The outputs from theeight terminals Trm[1] to Trm[8] are also input to the decoder 24.

In addition, the outputs from the terminals Trm[2] to Trm[8] are inputto multiplexers 31[1] to 31[7], respectively. The output from theterminal Trm[1] is also input to the multiplexers 31[1] to 31[7], andthe multiplexers 31[1] to 31[7] can select and output either the outputsfrom the terminals Trm[2] to Trm[8] or the output from the terminalTrm[1].

Outputs from the multiplexers 31[1] to 31[7] are input to the elementdevices 11[1,1] to 11[1,7] through the drive lines Drv[1,1] to Drv[1,7],respectively. To obtain the differences of the second physicalquantities of the element devices 11 in the second to eighth rows fromthe second physical quantities of the element devices 11 in the firstrow, the multiplexers 31[1] to 31 [7] select the output from theterminal Trm[1].

On the other hand, to obtain the differences of the second physicalquantities of the element devices 11[1,1] to 11[1,7] from the secondphysical quantity of the element device 11[1,0], the multiplexers 31[1]to 31[7] select the outputs from the terminals Trm[2] to Trm[8]. Notethat the output from the terminal Trm[1] is input to the element device11[1,0] through the drive line Drv[1,0].

As is apparent from FIG. 13A, the outputs from the terminals Trm[2] toTrm[8] are input to the element devices 11 in the second to eighth rowsthrough the drive lines Drv[2] to Drv[8] to obtain the differences ofthe second physical quantities of the element devices 11[1,1] to 11[1,7]from the second physical quantity of the element device 11[1,0]. Here,if the element devices 11 in the second to eighth rows change the firstphysical quantities of the sense lines Sns, accurate measurement cannotbe performed. Therefore, the element devices 11 in the second to eighthrows are preferably designed, as needed, so as not to change the firstphysical quantities of the sense lines Sns.

To achieve this, electric elements (the transistors 16) or the likewhich serve as switches may be provided in the element devices 11 asillustrated in FIG. 2A, for example. Alternatively, either the outputsfrom the terminals Trm[2] to Trm[8] or a potential V0 may be output frommultiplexers 32 to the drive lines Drv as illustrated in FIG. 13B.

In the case where the multiplexers 32 output the potential V0 to thedrive lines Drv, and particularly in the case where nonlinear elementssuch as the magnetic tunnel junction elements 15 are used, currenthardly flows even when the potentials of the sense lines Sns areslightly changed from V0, and thus, the same situation as if thetransistors 16 were off can be created.

The multiplexers 32 select the outputs from the terminals Trm[2] toTrm[8] to obtain the differences of the second physical quantities ofthe element devices 11 in the second to eighth rows from the secondphysical quantities of the element devices 11 in the first row. On theother hand, the multiplexers 32 output the potential V0 to obtain thedifferences of the second physical quantities of the element devices11[1,1] to 11[1,7] from the second physical quantity of the elementdevice 11[1,0].

Although the example of the small-scale matrix device with eight rowsand seven rows is described above, the same applies to a larger-scalematrix device as described in Embodiment 1. FIG. 14 illustrates anexample thereof. In an example of an electronic device illustrated inFIG. 14, each of the outputs from the terminals Trm[2] to Trm[8] of thesignal generation circuit 21 is distributed by the demultiplexer 22 tothe drive lines Drv as illustrated in FIG. 5. Outputs of themultiplexers 31 are input to demultiplexers 33.

Embodiment 3

The case of using a potential or a voltage as a first physical quantitywill be described below. Described here is an example of obtaining thecapacitance of the element device 11 by measuring the potential of thesense line Sns.

In this example, the element devices 11 each have a structure in which acapacitor 17 is provided at the intersection of the drive line Drv andthe sense line Sns as illustrated in FIG. 15A. The capacitor 17 of oneelement device 11 may differ from that of another element device 11.

For example, the capacitor 17 may have a capacitance which changes whenanother object approaches, in addition to a capacitance owing to theintersection of the drive line Drv and the sense line Sns. A capacitivetouch panel has such a structure.

For example, the capacitor 17 may include a dielectric capable ofchanging its dielectric constant or capacitance and may serve as amemory cell capable of storing data with a change in dielectric constantor capacitance. Note that a control transistor 16 which can be turned onor off with a word line Wrd (or a switch having a similar function) maybe included as illustrated in FIG. 15B.

Although a source and a drain of the transistor 16 are between the senseline Sns[7] and the capacitor 17 in FIG. 15B, the source and the drainof the transistor 16 may be between the drive line Drv[8] and thecapacitor 17.

When a potential is applied to the drive line Drv, the potential of thesense line Sns (in a floating state) is affected by the potential of thedrive line Drv owing to capacitive coupling through the capacitor 17.

For example, a case of the matrix device 10 with eight rows and sevencolumns in FIG. 1 is considered here in which the sense line Sns[7] isnot coupled to any capacitance other than those of the element devices11[1,7] to 11[8,7]. In an initial state (t=0), both of the potentials ofthe drive line Drv and the sense line Sns are assumed to be V0.

Next, at t=1, the potential of the sense line Sns[7] is changed by apotential ΔV_(S)[7]_(t=1). Assuming that the potentials of the drivelines Drv[1] to Drv[8] are changed by potentials ΔV_(D)[1]_(t=1) toΔV_(D)[8]_(t=1), the potential ΔV_(S)[7]_(t=1) can be represented, usingcapacitances c[1,7] to c[8,7] of the capacitors 17[1,7] to 17[8,7], by

${\Delta \; {V_{S}\lbrack 7\rbrack}_{t = 1}} = {\frac{{\Delta \; {V_{D}\lbrack 1\rbrack}_{t = 1}{c\lbrack {1,7} \rbrack}} + {\Delta \; {V_{D}\lbrack 2\rbrack}_{t = 1}{c\lbrack {2,7} \rbrack}} + \ldots + {\Delta \; {V_{D}\lbrack 8\rbrack}_{t = 1}{c\lbrack {8,7} \rbrack}}}{{c\lbrack {1,7} \rbrack} + {c\lbrack {2,7} \rbrack} + \ldots + {c\lbrack {8,7} \rbrack}}.}$

In reality, there is also a capacitance c[0,7] besides those of thecapacitors 17. Assuming that the potential of a counter electrode forthe capacitance c[0,7] is changed by ΔV_(p)[7]_(t=1), the potentialΔV_(S)[7]_(t=1) can be represented by

${\Delta \; {V_{S}\lbrack 7\rbrack}_{t = 1}} = {\frac{\begin{matrix}{{\Delta \; {V_{p}\lbrack 7\rbrack}_{t = 1}{c\lbrack {0,7} \rbrack}} + {\Delta \; {V_{D}\lbrack 1\rbrack}_{t = 1}{c\lbrack {1,7} \rbrack}} +} \\{{\Delta \; {V_{D}\lbrack 2\rbrack}_{t = 1}{c\lbrack {2,7} \rbrack}} + \ldots + {\Delta \; {V_{D}\lbrack 8\rbrack}_{t = 1}{c\lbrack {8,7} \rbrack}}}\end{matrix}}{{c\lbrack {0,7} \rbrack} + {c\lbrack {1,7} \rbrack} + {c\lbrack {2,7} \rbrack} + \ldots + {c\lbrack {8,7} \rbrack}}.}$

An example of the capacitance c[0,7] is a capacitance generated with thesense line Sns[6] or another wiring adjacent to the sense line Sns[7].

In the case where the coded signals based on the Hadamard matrix H oforder 8 are input to the drive lines Drv as described in Embodiment 1,the potentials ΔV_(D)[1]_(t=1) to ΔV_(D)[8]_(t=4) can be either VH−V0 orVL−V0 as described in Embodiment 1. It is assumed here that VH+VL=2V0.Since the same applies at times t=2 to t=8,

${\begin{pmatrix}{\Delta \; {V_{S}\lbrack 7\rbrack}_{t = 1}} \\{\Delta \; {V_{S}\lbrack 7\rbrack}_{t = 2}} \\\vdots \\\vdots \\{\Delta \; {V_{S}\lbrack 7\rbrack}_{t = 8}}\end{pmatrix} = {{\frac{c\lbrack {0,7} \rbrack}{C\lbrack 7\rbrack}\begin{pmatrix}{\Delta \; {V_{p}\lbrack 7\rbrack}_{t = 1}} \\{\Delta \; {V_{p}\lbrack 7\rbrack}_{t = 2}} \\\vdots \\\vdots \\{\Delta \; {V_{S}\lbrack 7\rbrack}_{t = 8}}\end{pmatrix}} + {\frac{{VH} - {V\; 0}}{C\lbrack 7\rbrack}{H\begin{pmatrix}{c\lbrack {1,7} \rbrack} \\{c\lbrack {2,7} \rbrack} \\\vdots \\\vdots \\{c\lbrack {8,7} \rbrack}\end{pmatrix}}}}},$

where H is the Hadamard matrix of order 8, and

C[7]=c[0,7]+c[1,7]+c[2,7]+ . . . +c[8,7].

Hence, according to a method similar to that described in Embodiment 1,

$\begin{pmatrix}{c\lbrack {1,7} \rbrack} \\{c\lbrack {2,7} \rbrack} \\\vdots \\\vdots \\{c\lbrack {8,7} }\end{pmatrix} = {\frac{1}{8( {{VH} - {V\; 0}} )}{{H\begin{pmatrix}{{{C\lbrack 7\rbrack}\Delta \; {V_{S}\lbrack 7\rbrack}_{t = 1}} - {{c\lbrack {0,7} \rbrack}\Delta \; {V_{p}\lbrack 7\rbrack}_{t = 1}}} \\{{{C\lbrack 7\rbrack}\Delta \; {V_{S}\lbrack 7\rbrack}_{t = 2}} - {{c\lbrack {0,7} \rbrack}\Delta \; {V_{p}\lbrack 7\rbrack}_{t = 2}}} \\\vdots \\\vdots \\{{{C\lbrack 7\rbrack}\Delta \; {V_{S}\lbrack 7\rbrack}_{t = 8}} - {{c\lbrack {0,7} \rbrack}\Delta \; {V_{p}\lbrack 7\rbrack}_{t = 8}}}\end{pmatrix}}.}}$

Since the capacitance c[0,7] is a capacitance generated with the senseline Sns[6] or another wiring adjacent to the sense line Sns[7] asdescribed above, the potentials ΔV_(p)[7]_(t=1) to ΔV_(p)[7]_(t=8)correspond to the potential of the sense line Sns[6] or the otherwiring. Thus, the potentials ΔV_(p)[7]_(t=1) to ΔV_(p)[7]_(t=8) mightdiffer from each other.

In the case where c[0,7] is extremely small, this term can be regardedas 0. In the case where there are small differences between thepotentials ΔV_(p)[7]_(t=1) to ΔV_(p)[7]_(t=8), the term can be regardedas a constant. In particular, when the potential changes of the senseline Sns[6] and the other wiring are 0, the term can be regarded as 0.That is, the equation can be approximated as

${\begin{pmatrix}{c\lbrack {1,7} \rbrack} \\{c\lbrack {2,7} \rbrack} \\\vdots \\\vdots \\{c\lbrack {8,7} }\end{pmatrix} = {\frac{C\lbrack 7\rbrack}{8( {{VH} - {V\; 0}} )}{{H\begin{pmatrix}{\Delta \; {V_{S}\lbrack 7\rbrack}_{t = 1}} \\{\Delta \; {V_{S}\lbrack 7\rbrack}_{t = 2}} \\\vdots \\\vdots \\{\Delta \; {V_{S}\lbrack 7\rbrack}_{t = 8}}\end{pmatrix}}.{Futhermore}}}},{\begin{pmatrix}{\Delta \; {V_{S}\lbrack 7\rbrack}_{t = 1}} \\{\Delta \; {V_{S}\lbrack 7\rbrack}_{t = 2}} \\\vdots \\\vdots \\{\Delta \; {V_{S}\lbrack 7\rbrack}_{t = 8}}\end{pmatrix} = {\frac{{VH} - {V\; 0}}{C\lbrack 7\rbrack}{{H\begin{pmatrix}{c\lbrack {1,7} \rbrack} \\{c\lbrack {2,7} \rbrack} \\\vdots \\\vdots \\{c\lbrack {8,7} \rbrack}\end{pmatrix}}.}}}$

The potential change of the sense line Sns can be prevented by, forexample, keeping the potential of the sense lines Sns[2], Sns[4], andSns[6] at V0 in the case of reading data through the sense lines Sns[1],Sns[3], Sns[5], and Sns[7].

As described in Embodiment 1, the element in the first row and the firstcolumn of the Hadamard matrix is 1. Thus, measurement is not performedat time t=1 as in the subsection <Data reading method—Basis> inEmbodiment 1. Furthermore, the techniques described in Embodiment 1 or 2can be modified as appropriate and employed for the matrix device inthis embodiment.

In the case where the matrix device 10 is, for example, a capacitivetouch panel, it is preferable that any of three values can be read asthe potential of the sense line Sns as described in the subsection <Datareading method—Basis> in Embodiment 1. Whether the touch panel istouched or not corresponds to whether a memory device stores data “0” or“1”.

In the touch panel, one or an odd number of element devices 11 of theelement devices 11 connected to one sense line Sns is/are notnecessarily touched, and in some cases, an even number (including 0) ofelement devices 11 may be touched. If the potential is determined withtwo values, accurate values cannot be calculated as described in thesubsection <Data reading method—Modification 3>. When any of threevalues can be read, a touch on the touch panel can be surely detectedregardless of whether an odd number or an even number of element devices11 are touched.

When it is known in advance whether the number of element devices 11touched is an even number or an odd number, the accuracy of criteria fordetermination can be lowered as described in the subsection <Datareading method—Modification 4>. Specifically, the resolution may bedouble. This is advantageous in the case where potential changes of thesense lines Sns are small and difficult to measure (as is often the casewith touch panels).

In view of this, the process of reading any of three values and theprocess of reading one of two values may be performed and the resultsmay be compared to identify an element device 11 which is touched. Inthat case, the accuracy of reading any of three values can be comparableto the accuracy of reading one of two values.

Note that the case where all data are the same as described in thesubsection <Data reading method—Modification 1> can be regarded as thecase where the touch panel is not touched at all.

When a potential change of the sense line Sns can be measured moreprecisely, the capacitances of the capacitors 17 in the element devices11 can also be compared. This enables not only determination of whetherthe element device 11 is touched or not but also estimation of the toucharea. In the case where an object touches a plurality of elementdevices, its center position and shape can also be estimated orcalculated.

This application is based on Japanese Patent Application serial no.2014-216179 filed with Japan Patent Office on Oct. 23, 2014, the entirecontents of which are hereby incorporated by reference.

What is claimed is:
 1. An electronic device comprising: N first wirings;a second wiring intersecting the N first wirings; first to N-th elementdevices provided at intersections of the N first wirings and the secondwiring; a detecting circuit; a decoder; and a driver, wherein the firstto N-th element devices include an n-th element device (n is an integergreater than or equal to 1 and less than or equal to N), wherein thedetecting circuit is capable of detecting a first physical quantity ofthe second wiring and transmitting a digital signal obtained bydigitizing the first physical quantity to the decoder, wherein each ofthe first to N-th element devices is capable of changing the firstphysical quantity in accordance with a signal of a corresponding one ofthe N first wirings, wherein the driver is capable of transmitting codedsignals based on a Hadamard matrix to the decoder and the N firstwirings, and wherein the decoder is capable of performing arithmeticprocessing with use of the coded signals and the digital signal andcalculating a value based on a second physical quantity of the n-thelement device.
 2. The electronic device according to claim 1, whereinthe Hadamard matrix is created by Sylvester's method and has an orderwhich is greater than or equal to 4 and is a power of
 2. 3. Theelectronic device according to claim 1, wherein the value based on thesecond physical quantity of the n-th element device is calculated as adifference from a value based on a second physical quantity of one ofthe first to N-th element devices excluding the n-th element device. 4.The electronic device according to claim 1, wherein the first physicalquantity is any one of a current, a potential and a voltage.
 5. Theelectronic device according to claim 1, wherein the second physicalquantity is any one of a resistance, a capacitance and a current value.6. The electronic device according to claim 1, wherein the decodercomprises first to N-th arithmetic circuits, and wherein the digitalsignal and a signal input to one of the N first wirings are input toeach of the arithmetic circuits.
 7. The electronic device according toclaim 1, further comprising a demultiplexer between the driver and the Nfirst wirings.
 8. The electronic device according to claim 1, furthercomprising a delay circuit between the driver and the decoder.
 9. Theelectronic device according to claim 1, wherein each of the elementdevices is a memory cell capable of storing multi-level data or analogdata.
 10. The electronic device according to claim 1, wherein the driveris configured not to output coded signals corresponding to the firstcolumn of the Hadamard matrix, and wherein the detecting circuit isconfigured not to detect the first physical quantity of the secondwiring at that time.
 11. A method for an electronic device comprising: Nfirst wirings; a second wiring intersecting the N first wirings; firstto N-th element devices (including an n-th element device (n is aninteger greater than or equal to 1 and less than or equal to N))provided at intersections of the N first wirings and the second wiring;a detecting circuit; a decoder; and a driver, wherein the first to N-thelement devices include an n-th element device (n is an integer greaterthan or equal to 1 and less than or equal to N), wherein the detectingcircuit is capable of detecting a first physical quantity of the secondwiring and transmitting a digital signal obtained by digitizing thefirst physical quantity to the decoder, and wherein each of the first toN-th element devices is capable of changing the first physical quantityin accordance with a signal of a corresponding one of the N firstwirings, the method comprising: transmitting coded signals based on aHadamard matrix from the driver to the decoder and the N first wirings;and performing arithmetic processing with use of the coded signals andthe digital signal and calculating a value based on a second physicalquantity of the n-th element device.
 12. The method for the electronicdevice according to claim 11, wherein the Hadamard matrix is created bySylvester's method and has an order which is greater than or equal to 4and is a power of
 2. 13. The method for the electronic device accordingto claim 11, wherein the value based on the second physical quantity ofthe n-th element device is calculated as a difference from a value basedon a second physical quantity of one of the first to N-th elementdevices excluding the n-th element device.
 14. The method for theelectronic device according to claim 11, wherein the first physicalquantity is any one of a current, a potential and a voltage.
 15. Themethod for the electronic device according to claim 11, wherein thesecond physical quantity is any one of a resistance, a capacitance and acurrent value.
 16. The method for the electronic device according toclaim 11, wherein the decoder comprises first to N-th arithmeticcircuits, and wherein the digital signal and a signal input to one ofthe N first wirings are input to each of the arithmetic circuits. 17.The method for the electronic device according to claim 11, wherein thecoded signals are transmitted via a demultiplexer to one of the N firstwirings.
 18. The method for the electronic device according to claim 11,wherein the coded signals are transmitted via a delay circuit to thedecoder.
 19. The method for the electronic device according to claim 11,wherein each of the element devices is a memory cell capable of storingmulti-level data or analog data.
 20. The method for the electronicdevice according to claim 11, wherein the driver is configured not tooutput coded signals corresponding to the first column of the Hadamardmatrix, and wherein the detecting circuit is configured not to detectthe first physical quantity of the second wiring at that time.